[PHP] IP Displayer

🚫
Exiled
Joined
Jun 24, 2008
Messages
719
Reaction score
1
Hey, I noticed Superfun's signature the other day.

It has something like:

Code:
Superfun Randomizer: lulz

Hello _IP_

Well, I made a quick script which shows your IP (clicky), how can I make it so it will enable me to have something like Superfun's signature?

Where it will show the IP?
 
Write it on an image.

http://nl.php.net/gd

A little example:

PHP:
<?php
$img = imagecreate(250, 250); //Image dimensions
$bg = imagecolorallocate($img, 255,255,255); //White background
$txtcolor = imagecolorallocate($img, 0, 0, 0); //Black textcolor. 

imagestring($img, 1, 50, 50, $_SERVER['REMOTE_ADDR'], $txtcolor); //Write IP to image

header('Content-type: image/gif');

imagegif($img);
imagedestroy($img);
?>
 
Monsta. - [PHP] IP Displayer - RaGEZONE Forums

(ip like above post)

randomizer is just
PHP:
$random['1'] = "lol";
$random['2'] = "lul";
$random['3'] = "orly";
$random = $random[rand(1,3)];
for the browser and os just get it from the useragent.
ill post an array of os and browser in an min
edit:

this is what i got so far, ofcourse there are loads more out on the internet:
PHP:
        $Browsers = array
                (
                        'MSIE 5.5' => 'IE 5.5',
                        'MSIE 6.0' => 'IE 6.0',
                        'MSIE 7.0' => 'IE 7.0',
                        'Konqueror' => 'Konqueror',
                        'Netscape' => 'Netscape',
                        'MSIE' => 'IE',
                        'Firefox' => 'Firefox',
                        'Chrome' => 'Google Chrome',
                        'Safari' => 'Safari',
                        'Opera' => 'Opera',
                        'Netscape' => 'Netscape',
                        'Galeon' => 'Galeon',
                        'Konqueror' => 'Konqueror',
                        'Lynx' => 'Lynx',
                        'Googlebot' => 'Google Bot',
                        'perl' => 'Perl LWP',
                        'Nikto' => 'Nikto Webscanner',	
                        'Mozilla/4.8' => 'Netscape',
                        'Charlotte' => 'Charlotte Web search',
                        'Minefield' => 'Minefield',
                        'SeaMonkey' => 'SeaMonkey',
                        'PLAYSTATION 3' => 'Playstation 3',  
                        'GranParadiso' => 'Mozilla GranParadiso',  
						'HTTrack' => 'HTTrack web copyier',
						'K-Meleon' => 'K-Meleon',
                );

        $OperatingSystems = array
                (
						'Windows 98' => 'Windows 98',
                        'Win98' => 'Windows 98',
                        'Windows NT 5.0' => 'Windows 2000',
                        'Win95' => 'Windows 95',
                        'Windows NT 5.1' => 'Windows XP',
                        'Linux' => 'Linux',
                        'Windows NT 6.0' => 'Windows Vista',
                        'Windows NT 5.2' => 'Windows 2003 server',
                        'Windows NT' => 'Windows NT',
                        'Win 9x 4.90' => 'Windows ME',
                        'Win ME' => 'Windows ME',
                        'Win CE' => 'Windows CE',
                        'Ubuntu' => 'Ubuntu',
                        'FreeBSD' => 'Free BSD',
                        'Symbian' => 'Symbian',
                        'Mac OS X' => 'Mac OS X',
                        'Macintosh' => 'Macintosh',
                        'Linux' => 'Linux',
                        'Unix' => 'Unix',
                        'Mac' => 'MacOs',
                        'PPC' => 'MacOs',
                        'HP' => 'HP-UX',
                        'SunOS' => 'Sun Solaris',
                        'Wii' => 'Wii',
                        'Googlebot' => 'Google Bot',
                        'perl' => 'Perl LWP',
                        'Nikto' => 'Nikto Webscanner',
                        'Charlotte' => 'Charlotte Web search',
                        'PLAYSTATION 3' => 'Playstation 3',  
                );
 
Thanks SF.

You've helped, but I don't know how to get it in the positions I want ^_^
 
Back