IP Sig how do u do it?
#1
Posted 25 September 2003 - 02:11 PM
#3
Posted 25 September 2003 - 02:19 PM
Quote
I'm thinking this is in the WRONG section.
lol i been there dun dat lol
#9
Posted 25 October 2003 - 02:43 PM
.htaccess
<Files ipaddress.jpg> ForceType application/x-httpd-php </Files>
ipaddress.jpg
<?php
Header ('Content-type: image/jpeg');
Header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
Header('Expires: Thu, 19 Nov 1981 08:52:00 GMT');
Header('Pragma: no-cache');
// set the dimensions
$img_width = 240;
$img_height = 25;
// create the image
$image = imagecreate($img_width, $img_height);
// set the colours
$cool = imagecolorallocate($image, 81, 86, 96);
$black = imagecolorallocate($image, 0, 0, 0);
$white = imagecolorallocate($image, 255, 255, 255);
$red = imagecolorallocate($image, 255, 0, 0);
$grey = imagecolorallocate($image, 204, 204, 204);
$green = imagecolorallocate($image, 206, 129, 18);
$blue = imagecolorallocate($image, 0, 0, 255);
// set the background colour and border
imagefilledrectangle($image, 0, 0, $img_width, $img_height, $cool);
// set the font and print text
$font = '/path/to/your/ttf/font';
ImageTTFText ($image, 8, 0, 10, 17, $white, $font, "Your IP Address is... ".$REMOTE_ADDR);
// output and destroy
imagepng($image);
imagedestroy($image);
?>
and your font file. I use Verdana...
If you continue playing on, you can put in a background color, pics, random text, etc.
Good luck!
#10
Posted 25 October 2003 - 04:04 PM
#12
Posted 27 October 2003 - 03:25 AM
#13
Posted 27 October 2003 - 08:38 AM
Thanatos, on Oct 27 2003, 05:25 AM, said:
The php calls holders (images) which are png files. The actually image you see is actually the script but you place a htaccess file and within that you trick the server to think its a jpg instead of .php file.
#14
Posted 27 October 2003 - 03:18 PM
Thanatos, on Oct 27 2003, 05:25 AM, said:
You have to use different commands:
ipaddress.jpg
<?php
Header ('Content-type: image/png');
Header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
Header('Expires: Thu, 19 Nov 1981 08:52:00 GMT');
Header('Pragma: no-cache');
// create the image
$image = imagecreatefrompng("name-of-pic.png");
// set the colours
$cool = imagecolorallocate($image, 81, 86, 96);
$black = imagecolorallocate($image, 0, 0, 0);
$white = imagecolorallocate($image, 255, 255, 255);
$red = imagecolorallocate($image, 255, 0, 0);
$grey = imagecolorallocate($image, 204, 204, 204);
$green = imagecolorallocate($image, 206, 129, 18);
$blue = imagecolorallocate($image, 0, 0, 255);
// set the font and print text
$font = '/path/to/your/ttf/font
ImageTTFText ($image, 8, 0, 10, 17, $white, $font, "Your IP Address is... ".$REMOTE_ADDR);
// output and destroy
imagepng($image);
imagedestroy($image);
?>
#15
Posted 02 November 2003 - 06:30 PM
.htaccess :
Options None
<Limit GET POST>
order deny,allow
deny from all
allow from all
require group authors administrators
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthType Basic
AuthName www.phazm.net
AuthUserFile xxxx/service.pwd
AuthGroupFile xxxx/service.grp
<Files siggy.jpg>
ForceType application/x-httpd-php
</Files>
then in siggy.jpg I have:
<?php
Header ('Content-type: image/png');
Header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
Header('Expires: Thu, 19 Nov 1981 08:52:00 GMT');
Header('Pragma: no-cache');
// create the image
$image = imagecreatefrompng("bg.png");
// set the colours
$cool = imagecolorallocate($image, 81, 86, 96);
$black = imagecolorallocate($image, 0, 0, 0);
$white = imagecolorallocate($image, 255, 255, 255);
$red = imagecolorallocate($image, 255, 0, 0);
$grey = imagecolorallocate($image, 204, 204, 204);
$green = imagecolorallocate($image, 206, 129, 18);
$blue = imagecolorallocate($image, 0, 0, 255);
// set the font and print text
$font = 'Arial.ttf'
ImageTTFText ($image, 8, 0, 10, 17, $white, $font, "Your IP Address is... ".$REMOTE_ADDR);
// output and destroy
imagepng($image);
imagedestroy($image);
?>
then in bg.png I have a pure black BG,
and I have Arial.ttf in the same dir as everything else...
#16
Posted 02 November 2003 - 08:44 PM
<?php phpinfo(); ?>
Scroll down to see if GD is enabled, if it isn't, then that is probably your main problem!
And you shouldn't put anything else in the .htaccess file except for what I mentioned above!
#17
Posted 04 November 2003 - 12:53 AM
GD is enabled :-/
and .htaccess is fine, I renamed the file to a .php (http://www.phazm.net/siggy.php) and it's just the red x :-/
#18
Posted 04 November 2003 - 12:58 AM
<Files siggy.jpg>
ForceType application/x-httpd-php
</Files>
and I made siggy.jpg:
<?php
Header ('Content-type: image/jpeg');
Header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
Header('Expires: Thu, 19 Nov 1981 08:52:00 GMT');
Header('Pragma: no-cache');
// set the dimensions
$img_width = 240;
$img_height = 25;
// create the image
$image = imagecreate($img_width, $img_height);
// set the colours
$cool = imagecolorallocate($image, 81, 86, 96);
$black = imagecolorallocate($image, 0, 0, 0);
$white = imagecolorallocate($image, 255, 255, 255);
$red = imagecolorallocate($image, 255, 0, 0);
$grey = imagecolorallocate($image, 204, 204, 204);
$green = imagecolorallocate($image, 206, 129, 18);
$blue = imagecolorallocate($image, 0, 0, 255);
// set the background colour and border
imagefilledrectangle($image, 0, 0, $img_width, $img_height, $cool);
// set the font and print text
$font = 'Arial.ttf';
ImageTTFText ($image, 8, 0, 10, 17, $white, $font, "Your IP Address is... ".$REMOTE_ADDR);
// output and destroy
imagepng($image);
imagedestroy($image);
?>
and it just comes up with a blank page:
http://www.phazm.net/siggy.jpg
gah! :-P
#19
Posted 04 November 2003 - 01:16 AM
#20
Posted 04 November 2003 - 03:27 PM



Help
This topic is locked

Back to top










