Okay...don't ask me how, but...
#1
Rennlist Member
Thread Starter
Join Date: May 2001
Location: Crofton, MD
Posts: 1,363
Likes: 0
Received 0 Likes
on
0 Posts
Okay...don't ask me how, but... (useless but entertaining thread)
I know who you are! Check it:
crazy, huh?
crazy, huh?
Last edited by ribs; 07-23-2003 at 09:53 PM.
#7
Racer
Join Date: Jan 2003
Location: Burlington, KY, USA
Posts: 280
Likes: 0
Received 0 Likes
on
0 Posts
Ribs, pertaining to your first post, it really is just a simple PHP code. This is a smple of the general code, which some notes here and there.
code:
--------------------------------------------------------------------------------
?php//// get the information about the brower etc// this needs browsecap.ini to be up-to-date and// the browsecap entry in php.ini to be set to on//$tempthing = get_browser();$browser = $tempthing->parent;$os = $tempthing->platform;// // now make up the ip and domain details (read the php.net documentation and// notes on the gethostbyaddr() function and the $_SERVER[$REMOTE_HOST] variable// if you really want to see why I did it this way.//$ip = $_SERVER['REMOTE_ADDR'] ? $_SERVER['REMOTE_ADDR'] : "unknown address";$domain = $_SERVER['REMOTE_ADDR'] ? gethostbyaddr($ip) : "unknown host";//// set up the tsxt strings to be superimposed on the graphic//$line0="Rameses Niblik the Third Sees all knows all";$line1="Hello ".$ip." at ".$domain;$line2="are you happy with ".$browser." on ".$os."?";//// define the mime-type and get the starting picture//header("Content-type: image/jpeg");$im = imagecreatefromjpeg("./rn3.jpg");//// define a few colours for the text// linux handles colours pretty poorly so I use imagecolorclosest()// for a solaris box you can use imagecolorallocate() and get a precise match// the black is to give me a chiselled look - use a 1+1 px diagonal offset//$black = imagecolorclosest($im, 0, 0, 0);$orange = imagecolorclosest($im, 255, 80, 0);//// font size 1 is 5 px wide, size 2 is 6, size 3 is 7.5// you have 5 font sizes to choose from and you can import// and define more fonts if you want to (see imageloadfont())// The first line calculates the centred starting position for a line// the next 2 put it on the pikkie forst in black then in colour//$px = (imagesx($im) - 5 * strlen($line0)) / 2;imagestring($im, 1, $px, 3, $line0, $black);imagestring($im, 1, $px+1, 4, $line0, $orange);//// repeat for the number of lines you have//$px = (imagesx($im) - 5 * strlen($line1)) / 2;imagestring($im, 1, $px, 16, $line1, $black);imagestring($im, 1, $px+1, 17, $line1, $orange);//// we have two of them//$px = (imagesx($im) - 5 * strlen($line2)) / 2;imagestring($im, 1, $px, 28, $line2, $black);imagestring($im, 1, $px+1, 29, $line2, $orange);//// output the new picture and clean up//imagejpeg($im);imagedestroy($im);//// bingo ... simple eh ??//?>
--------------------------------------------------------------------------------
Well, gah, there are supposed to be line breaks, but I don't want togo through and put them all in. This is another sample of what this code can do.
code:
--------------------------------------------------------------------------------
?php//// get the information about the brower etc// this needs browsecap.ini to be up-to-date and// the browsecap entry in php.ini to be set to on//$tempthing = get_browser();$browser = $tempthing->parent;$os = $tempthing->platform;// // now make up the ip and domain details (read the php.net documentation and// notes on the gethostbyaddr() function and the $_SERVER[$REMOTE_HOST] variable// if you really want to see why I did it this way.//$ip = $_SERVER['REMOTE_ADDR'] ? $_SERVER['REMOTE_ADDR'] : "unknown address";$domain = $_SERVER['REMOTE_ADDR'] ? gethostbyaddr($ip) : "unknown host";//// set up the tsxt strings to be superimposed on the graphic//$line0="Rameses Niblik the Third Sees all knows all";$line1="Hello ".$ip." at ".$domain;$line2="are you happy with ".$browser." on ".$os."?";//// define the mime-type and get the starting picture//header("Content-type: image/jpeg");$im = imagecreatefromjpeg("./rn3.jpg");//// define a few colours for the text// linux handles colours pretty poorly so I use imagecolorclosest()// for a solaris box you can use imagecolorallocate() and get a precise match// the black is to give me a chiselled look - use a 1+1 px diagonal offset//$black = imagecolorclosest($im, 0, 0, 0);$orange = imagecolorclosest($im, 255, 80, 0);//// font size 1 is 5 px wide, size 2 is 6, size 3 is 7.5// you have 5 font sizes to choose from and you can import// and define more fonts if you want to (see imageloadfont())// The first line calculates the centred starting position for a line// the next 2 put it on the pikkie forst in black then in colour//$px = (imagesx($im) - 5 * strlen($line0)) / 2;imagestring($im, 1, $px, 3, $line0, $black);imagestring($im, 1, $px+1, 4, $line0, $orange);//// repeat for the number of lines you have//$px = (imagesx($im) - 5 * strlen($line1)) / 2;imagestring($im, 1, $px, 16, $line1, $black);imagestring($im, 1, $px+1, 17, $line1, $orange);//// we have two of them//$px = (imagesx($im) - 5 * strlen($line2)) / 2;imagestring($im, 1, $px, 28, $line2, $black);imagestring($im, 1, $px+1, 29, $line2, $orange);//// output the new picture and clean up//imagejpeg($im);imagedestroy($im);//// bingo ... simple eh ??//?>
--------------------------------------------------------------------------------
Well, gah, there are supposed to be line breaks, but I don't want togo through and put them all in. This is another sample of what this code can do.
Trending Topics
#10
Racer
Join Date: Jan 2003
Location: Burlington, KY, USA
Posts: 280
Likes: 0
Received 0 Likes
on
0 Posts
Well, if you're using a router and a firewall, etc, that would affect it. Also, the code only allows for a certain size database, so it might not have logged your ISP. It is just PHP, afterall.
-=Kenneth=-
-=Kenneth=-
#11
Rennlist Member
Thread Starter
Join Date: May 2001
Location: Crofton, MD
Posts: 1,363
Likes: 0
Received 0 Likes
on
0 Posts
Last but not least...
I figured it was some PHP code since the company that hosts the program specialized in PHP programming...I think its still pretty trick, and I've never seen it before...it kind of scared me at first...cool stuff though.
I figured it was some PHP code since the company that hosts the program specialized in PHP programming...I think its still pretty trick, and I've never seen it before...it kind of scared me at first...cool stuff though.
#12
Rennlist Member
Thread Starter
Join Date: May 2001
Location: Crofton, MD
Posts: 1,363
Likes: 0
Received 0 Likes
on
0 Posts
More optical illusions, if anybody is interested (I just had them sitting up on my website and never used them for anything really):
and finally...the biggest pimp ever:
and finally...the biggest pimp ever:
#15
Re: Okay...don't ask me how, but... (useless but entertaining thread)
Originally posted by ribs
I know who you are! Check it:
crazy, huh?
I know who you are! Check it:
crazy, huh?