DDRtists
ɹoʇɐɹǝpoɯ ɹǝdns
- Reaction score
- 415
Made by request, too lazy to make a guy with a sign ( Someone make me one, and I'll make the script for it. ).
It requires the GD Module, but that comes with most PHP Distributions. ( Though, Your host has to enable it... ).
Please don't link to my image, I don't need the added Bandwidth loss.
Right Now, it looks like:
I'm sure you can edit it, though.
Script:
And yes, it does work on the Wii.
http://img262.imageshack.us/img262/1757/dsc086117hq.jpg
Like my IP? Lol @ being on the same network as the server.
You can also add more Browsers/OSes in there too, if you want.
It requires the GD Module, but that comes with most PHP Distributions. ( Though, Your host has to enable it... ).
Please don't link to my image, I don't need the added Bandwidth loss.
Right Now, it looks like:
I'm sure you can edit it, though.
Script:
PHP:
<?
$os = get_os_name($_SERVER['HTTP_USER_AGENT']);
$ip = GetHostByName($REMOTE_ADDR);
$using = get_browser_name($_SERVER['HTTP_USER_AGENT']);
if($os == 'Unknown') $OSString = 'Hmm, I guess you have a leet OS!';
if($os != 'Unknown') $OSString = 'Your OS is '.$os.'!';
if($using == 'Unknown') $BString = 'Hmm, I guess you have a leet Browser!';
if($using != 'Unknown') $BString = 'Your Browser is '.$using.'!';
$IPString = 'Your IP is '.$ip.'!';
header("content-type: image/png");
$im = imagecreate(400,80);
$black = imagecolorallocate($im,0,0,0);
$white = imagecolorallocate($im,255,255,255);
imagefill($im,0,0,$black);
imagestring($im,12,10,10,$OSString,$white);
imagestring($im,12,10,30,$BString,$white);
imagestring($im,12,10,50,$IPString,$white);
imagepng($im);
imagedestroy($im);
function get_os_name($user_agent)
{
$oses = array (
'Windows 3.11' => 'Win16',
'Windows 95' => '(Windows 95)|(Win95)|(Windows_95)',
'Windows 98' => '(Windows 98)|(Win98)',
'Windows 2000' => '(Windows NT 5.0)|(Windows 2000)',
'Windows XP' => '(Windows NT 5.1)|(Windows XP)',
'Windows 2003' => '(Windows NT 5.2)',
'Windows NT 4.0' => '(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)',
'Windows ME' => 'Windows ME',
'Open BSD'=>'OpenBSD',
'Sun OS'=>'SunOS',
'Linux'=>'(Linux)|(X11)',
'Macintosh'=>'(Mac_PowerPC)|(Macintosh)',
'QNX'=>'QNX',
'BeOS'=>'BeOS',
'OS/2'=>'OS/2',
'Search Bot'=>'(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp/cat)|(msnbot)|(ia_archiver)'
);
foreach($oses as $os=>$pattern)
{
if (eregi($pattern, $user_agent)) return $os;
}
return 'Unknown';
}
function get_browser_name($user_agent)
{
$browsers = array(
'Nintendo Wii' => '(Nintendo Wii)',
'Opera' => 'Opera',
'Mozilla Firefox'=> '(Firebird)|(Firefox)',
'Galeon' => 'Galeon',
'Mozilla'=>'Gecko',
'MyIE'=>'MyIE',
'Lynx' => 'Lynx',
'Netscape' => '(Mozilla/4\.75)|(Netscape6)|(Mozilla/4\.08)|(Mozilla/4\.5)|(Mozilla/4\.6)|(Mozilla/4\.79)',
'Konqueror'=>'Konqueror',
'SearchBot' => '(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp/cat)|(msnbot)|(ia_archiver)',
'Internet Explorer 7' => '(MSIE 7\.[0-9]+)',
'Internet Explorer 6' => '(MSIE 6\.[0-9]+)',
'Internet Explorer 5' => '(MSIE 5\.[0-9]+)',
'Internet Explorer 4' => '(MSIE 4\.[0-9]+)',
);
foreach($browsers as $browser=>$pattern)
{
if (eregi($pattern, $user_agent)) return $browser;
}
return 'Unknown';
}
?>
And yes, it does work on the Wii.
http://img262.imageshack.us/img262/1757/dsc086117hq.jpg
Like my IP? Lol @ being on the same network as the server.
You can also add more Browsers/OSes in there too, if you want.