Help - Search - Members - Calendar
Full Version: IP Sig
MSFN Forums > Customizing Windows and Graphics > Graphics and Designing Art > Signatures
Pages: 1, 2, 3, 4

   
Google Internet Forums Unattended CD/DVD Guide
eXPerience-XP
I noticed that some ppl have a sig where theres an image and it shows the viewers IP and Operating system. Could someone show me how to do this?
XPerties
I'm thinking this is in the WRONG section.

biggrin.gif
Carmon
QUOTE
XPerties Posted on Sep 25 2003, 09:17 PM
  I'm thinking this is in the WRONG section.


lol i been there dun dat lol biggrin.gif
eXPerience-XP
o sorry sad.gif
DaveXP
just take someone else saves time...lol

smile.gif
Tinker


Try here.......

biggrin.gif
b0r3d
Interesting ...
eXPerience-XP
thx tinker i just saw ur reply now.. lol
gamehead200
Well, first of all, you need about 3 files which contain the following:

.htaccess
CODE
<Files ipaddress.jpg>
ForceType application/x-httpd-php
</Files>


ipaddress.jpg
CODE
<?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. newwink.gif

Good luck! biggrin.gif
XPerties
http://www.xperties.net/

yah and you get the sig like this on my frontpage. biggrin.gif
Carmon
huh.gif looks very hard and confusing huh.gif
Thanatos
The thing I don't get about those, is how do you use a custom image? I'm not too hot with php, but I can't see anything in that code which imports an image and overlays stuff onto it
XPerties
QUOTE (Thanatos @ Oct 27 2003, 05:25 AM)
The thing I don't get about those, is how do you use a custom image? I'm not too hot with php, but I can't see anything in that code which imports an image and overlays stuff onto it

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.
gamehead200
QUOTE (Thanatos @ Oct 27 2003, 05:25 AM)
The thing I don't get about those, is how do you use a custom image? I'm not too hot with php, but I can't see anything in that code which imports an image and overlays stuff onto it

You have to use different commands:

ipaddress.jpg
CODE
<?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);

?>
tawxic
When I do this, it just shows me a blank page (both versions of scripts) - I think my hoster might be incompatible, but I don't know with what.. it can use PHP just fine... any suggestions? Here is what I have:

.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...
gamehead200
Create a PHP file and put this in it:

CODE
<?php phpinfo(); ?>

Scroll down to see if GD is enabled, if it isn't, then that is probably your main problem! smile.gif

And you shouldn't put anything else in the .htaccess file except for what I mentioned above! smile.gif
tawxic
http://www.phazm.net/phpinfo.php

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 :-/
tawxic
I just hate .htaccess only ave what you said to (with my own filename):

<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
tawxic
well, I got http://www.phazm.net/siggy.php to draw a bg color... (I just went in and changed some php.ini settings) but it doesn't write any text.
gamehead200
Try putting the full path to your font without using CAPITAL letters... smile.gif Then it might work...
crowman
wow this sounds and looks very hard and confusing, I had a look at a site which was a tutorial for PHP and my god i think i will skip it sad.gif
tawxic
woot!

okay, adding the full path worked... I now have it working, but only under a .php file.. when I rename it to .jpg or .png and add the neccisary .htaccess file, it's just a blank page, with the php source in the source of the document.. without the .htaccess file telling it to act as if it were php, it displays the php source in the window, so it seems as if the file just isn't loading as if it was php.... suggestions?

(this board doesn't allow the .php extension for img tags :-/
tawxic
hey, a bit off topic maybe, but related... I want to add the CLIENT time in my sig, but I can't think of a way to get the client time in PHP, and I don't think I can use javascript in the image, can I? if no, what are my possible solutions, if any?
gamehead200
QUOTE (tawxic @ Nov 4 2003, 08:31 PM)
woot!

okay, adding the full path worked... I now have it working, but only under a .php file.. when I rename it to .jpg or .png and add the neccisary .htaccess file, it's just a blank page, with the php source in the source of the document.. without the .htaccess file telling it to act as if it were php, it displays the php source in the window, so it seems as if the file just isn't loading as if it was php.... suggestions?

(this board doesn't allow the .php extension for img tags :-/

Glad it worked out...Please post your codes here so I can take a look at them...Is it the client time you want or the server time? I know its written CLIENT, just want to make sure! smile.gif
gamehead200
QUOTE (tawxic @ Nov 4 2003, 01:58 AM)
<Files siggy.jpg>
ForceType application/x-httpd-php
</Files>

...

and it just comes up with a blank page:

http://www.phazm.net/siggy.jpg

gah! :-P

If both siggy.jpg and siggy.php are in the same folder using the same .htaccess file, you must change the .htaccess file and input the following:

CODE
<Files siggy.jpg>
ForceType application/x-httpd-php
</Files>

<Files siggy.php>
ForceType application/x-httpd-php
</Files>

This way, it will parse both files! biggrin.gif
tawxic
siggy.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');
$COUNT_FILE = "hitcounter.dat";

if (file_exists($COUNT_FILE)) {
$fp = fopen("$COUNT_FILE", "r+");
flock($fp, 1);
$count = fgets($fp, 4096);
$count += 1;
fseek($fp,0);
fputs($fp, $count);
flock($fp, 3);
fclose($fp);
} else {
echo "Can't find file, check '\$file'<BR>";
}
// 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, $blue);

// set the font and print text
$font = '/var/www/html/verdana.ttf';

// ImageTTFText ($image, 8, 0, 10, 17, $black, $font, "Your IP Address is... ".$visitors);
ImageTTFText ($image, 8, 0, 10, 17, $black, $font, "Views: ".$count);

// output and destroy
imagepng($image);
imagedestroy($image);

?>

END

This will just put a blue bar with a nice counter on there smile.gif (if you have the hitcounter.dat file in the same dir)

example: http://www.phazm.net/signature/siggy.php
tawxic
I added what tou said to htaccess... still isn't parsing

http://www.phazm.net/signature/siggy.jpg
tawxic
Can you do me a fav?

d/l http://www.phazm.net/siggy.rar and u/l it to your own webspace? (just the 3 files) so I can see if it's a compatibility issue with my hoster?
Carmon
QUOTE
crowman Posted on Nov 5 2003, 01:40 AM
  wow this sounds and looks very hard and confusing, I had a look at a site which was a tutorial for PHP and my god i think i will skip it


am wiv u crowman lol wacko.gif
gamehead200
QUOTE (tawxic @ Nov 4 2003, 11:36 PM)
siggy.php ::

...

END

This will just put a blue bar with a nice counter on there smile.gif  (if you have the hitcounter.dat file in the same dir)

example:  http://www.phazm.net/signature/siggy.php

Mine's simpler:

CODE
<?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 = imagecreatefromgif("about-bg.gif");

// set the colours
$cool = imagecolorallocate($image, 87, 87, 87);
$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);

// counter
$viewss = file("views.txt");
$views = $viewss[0]; $views++;
$fp = fopen("views.txt", "w");
fwrite($fp, $views);
fclose($fp);
$counter = "GAMEHEAD200 || This sig has been viewed $views times!";

// define geek code
$geek = "-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d+ s+:+ a---- C++ !U !P L+ E-- W+++$ N+ !o K- w++$
O--- M$ V? PS PE++ Y+ !PGP !t !5 !X !R tv+++ b++ DI !D
G e- h! r-- !y
------END GEEK CODE BLOCK------";

// line style line
$line = "________________________________________________________";

// set the font and print text
$font = 'font.ttf';

ImageTTFText ($image, 8, 0, 12, 45, $black, $font, $geek);
ImageTTFText ($image, 8, 0, 12, 148, $black, $font, $line);
ImageTTFText ($image, 8, 0, 12, 180, $black, $font, $counter);

// output and destroy
imagepng($image);
imagedestroy($image);

?>


Try to find out how it works! thumbup.gif I'll try using yours tonight because right now I don't have the time...
tawxic
now it wont show anything but a red x again (when viewed as a php file) and nothing at all as a jpg (but you can view source my code)..

this is frustrating... it should work fine...

my about-bg.gif:



my siggy.php code:

CODE
<?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 = imagecreatefromgif("/var/www/html/signature/about-bg.gif");

// set the colours
$cool = imagecolorallocate($image, 87, 87, 87);
$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);

// counter
$viewss = file("/var/www/html/signature/views.txt");
$views = $viewss[0]; $views++;
$fp = fopen("/var/www/html/signature/views.txt", "w");
fwrite($fp, $views);
fclose($fp);
$counter = "Phazm Graphics - $views people served since 11/5/03!";

// define geek code
$nerd = "-----BEGIN NERD CODE BLOCK-----
Version: 1.2a
010011010111100100100000011100110110100101100111
011001110111100100100000011101110110100101101100
011011000010000001110011011011110110111101101110
001000000111001001101111011000110110101100100001
00100000
------END NERD CODE BLOCK------";

// line style line
$line = "________________________________________________________";

// set the font and print text
$font = '/var/www/html/verdana.ttf';

ImageTTFText ($image, 8, 0, 12, 45, $black, $font, $nerd);
ImageTTFText ($image, 8, 0, 12, 148, $black, $font, $line);
ImageTTFText ($image, 8, 0, 12, 180, $black, $font, $counter);

// output and destroy
imagepng($image);
imagedestroy($image);

?>

(note that I tried using relative links again, no difference that I could see)

and that's really all I need to have... htaccess would be if I viewed it a a jpg, so it opened it as a php document instead of a jpg file.. but It already has a php extension...

(I added it anyway)
gamehead200
I know exactly what the problem is...Make sure there is a file called "view.txt" in the same folder and make you CHMOD it to 666 or esle it won't work... smile.gif

And also make sure your image is 128 colors...GD will not work properly if you have an image with over 128 colors...Yours had over that many, so I edited it in Photoshop for you...It looks extremely similar...

Here is the code I used for YOUR about.png:
CODE
<?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 = imagecreatefromgif("about-bg.gif");

// set the colours
$cool = imagecolorallocate($image, 87, 87, 87);
$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);

// counter
$viewss = file("views.txt");
$views = $viewss[0]; $views++;
$fp = fopen("views.txt", "w");
fwrite($fp, $views);
fclose($fp);
$counter = "Phazm Graphics - $views people served since 11/5/03!";

// define geek code
$nerd = "-----BEGIN NERD CODE BLOCK-----
Version: 1.2a
010011010111100100100000011100110110100101100111
011001110111100100100000011101110110100101101100
011011000010000001110011011011110110111101101110
001000000111001001101111011000110110101100100001
00100000
------END NERD CODE BLOCK------";

// line style line
$line = "________________________________________________________";

// set the font and print text
$font = 'verdana.ttf';

ImageTTFText ($image, 8, 0, 45, 35, $white, $font, $nerd);
ImageTTFText ($image, 8, 0, 45, 138, $white, $font, $line);
ImageTTFText ($image, 8, 0, 45, 170, $white, $font, $counter);

// output and destroy
imagepng($image);
imagedestroy($image);

?>


And here is the edited background:
tawxic
nope! That didn't work either..

this is the error I'm getting in my errorlog(I should've checked this a log time ago)

[05-Nov-2003 17:17:33] PHP Fatal error: Call to undefined function: imagecreatefromgif() in /var/www/html/signature/siggy.php on line 9

no idea why that fuction wouldn't be supported...
tawxic
okay, it IS somethign with my host, because I have it on my companies website just fine...


www.rfstorm.com/sig/siggy.php
tawxic
got it to work in jpg and png format on my companies host :-/

gamehead200
QUOTE (tawxic @ Nov 5 2003, 06:30 PM)
got it to work in jpg and png format on my companies host :-/


Copy cat! tongue.gif laugh.gif
tawxic
lol, I don't plan on keeping the design, don't worry, it's just a placeholder :-P

Anyhow, I figured out that my GD version is the one that createimagefromgif doesn't work (d'oh!) so I made it "createimagefrompng" and now it works, but for some odd reason it indents to text:

http://www.phazm.net/signature/siggy.php

however, I cannot view anything other than .php, (e.g. jpg or png) - so I think my host has htaccess disabled maybe? not sure... I'll email em tonight...

Hey, I just want to say I'm greatful for all your help gamehead, I couldn't have gotten close to this far without you!
gamehead200
QUOTE (tawxic @ Nov 5 2003, 07:21 PM)
lol, I don't plan on keeping the design, don't worry, it's just a placeholder :-P

Anyhow, I figured out that my GD version is the one that createimagefromgif doesn't work (d'oh!) so I made it "createimagefrompng" and now it works, but for some odd reason it indents to text:

http://www.phazm.net/signature/siggy.php

however, I cannot view anything other than .php, (e.g. jpg or png) - so I think my host has htaccess disabled maybe?  not sure... I'll email em tonight...

Hey, I just want to say I'm greatful for all your help gamehead, I couldn't have gotten close to this far without you!

tawxic, its impossible that your host disabled .htaccess files, or else the image would not have been parsed...In this case, it was, so .htaccess was enabled...

And BTW, you should have been there to see what I had to go through to figure out how to do this on other forums...I even showed XPerties how to do one for eMax Hosting which he got rid of (I think...) rolleyes.gif !
tawxic
hehe.

Well, what do you think it could be then? It works fine on another host, but not this one? obviously something is different that is causing mine to be uncompatible
tawxic
I updated my script, not it displays a random quote:



but is there any way to center the quote vertically? (so it's the same distance from the top to the bar)
un4given1
tawxic: hate to burst your bubble dewd, but the new sig policy doesn't allow you to have a sig that big.
tawxic
QUOTE (un4given1 @ Nov 6 2003, 02:32 PM)
tawxic: hate to burst your bubble dewd, but the new sig policy doesn't allow you to have a sig that big.

after I get this thing fine tuned, I will make a smaller version.. this will be my version for other pages.
gamehead200
Don't worry, the sig rule changed back AGAIN...You can keep that sig...
bman3022
Hi welcome.gif
can some one help me with this?

I made it using this to make it
CODE
<?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');


$image = imagecreatefromgif("bg.gif");
$back_color = ImageColorAllocate ($image, 0, 10, 10);
$white = ImageColorAllocate($im, 255, 255, 255);
$ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : $REMOTE_ADDR );


ImageString ($image, 10, 12, 50, "Your ip is $ip", $white);
ImageString ($image, 10, 12, 80,  "Your ip is ", $white);
ImageString ($image, 10, 12, 100,  "Your ip is $ip", $white);
Imagepng($image);
imagedestroy($image);
?>

It came out looking like this
As you can see so far ive only been able to put the ip thing in. Each time i try to put something else in to it i get a blank screen.
I wanted to add a random quote thing like tawxic's but each time i put in that code i keep getting a blank screen can sombody please help me?

O and does anybody know the code that tells you your browser and OS
Something like this
""you are running on windows xp and using IE 6.0"

Thanks in advance thumbup.gif
gamehead200
OK, so for the random quotes, you would need a TXT file called "quotes.txt" with all the quotes on each line...

Then you would create a JPG file with the following:

CODE
<?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');

// create the image
$image = imagecreatefromjpeg("background.jpg");

// 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 quote file
$quotes = file('quotes.txt');
$quote = array_rand($quotes);

// set the font and print text
$font = '/path/to/your/ttf/font';

$joke = wordwrap($quotes[$quote], 60, "\n", 1);
$joke = explode("\n", $joke);

for($i=0; $i<count($joke); $i++) {
ImageTTFText ($image, 8, 0, 14, (23+($i*15)), $white, $font, $joke[$i]);
}

// output and destroy
imagepng($image);
imagedestroy($image);

?>


You would also need a background picture called "background.jpg" and the htaccess file mentioned in this topic... This code should be pretty simple to understand...

I've tried including the OS and browser but it has never come out properly for me... I'll post it in here as soon as I find out... smile.gif
bman3022
Thanks man thumbup.gif
I got it to work
I had to edit it a little bit but it works now biggrin.gif
is there anyway to change the font size?
gamehead200
QUOTE (bman3022 @ Nov 23 2003, 09:10 PM)
Thanks man thumbup.gif
I got it to work
I had to edit it a little bit but it works now biggrin.gif
is there anyway to change the font size?

QUOTE
ImageTTFText ($image, 8, 0, 14, (23+($i*15)), $white, $font, $joke[$i]);

Change the 8 to an even number...

Can we see the final result? rolleyes.gif
bman3022
im still working on it but here it is
o and i have one little problem sometimes the qoute wraps on top of it self.
any way to fix it?


Have you found any thing on how to put the browser and os name ?
gamehead200
QUOTE (bman3022 @ Nov 23 2003, 10:39 PM)
im still working on it but here it is
o and i have one little problem sometimes the qoute wraps on top of it self.
any way to fix it?


Have you found any thing on how to put the browser and os name ?

The quote shouldn't wrap on itself... It should automatically go to the next line...

No, I haven't found out yet... sad.gif
bman3022
well the qoutes not wrapping to the next line
Heres the code i used im i doing something wrong?
CODE
<?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');

$image = imagecreatefromgif("bg.gif");
$back_color = ImageColorAllocate ($image, 0, 5, 5);
$white = ImageColorAllocate($im, 255, 255, 255);
$ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : $REMOTE_ADDR );
$quotes = file('quotes.txt');
$quote = array_rand($quotes);
$joke = wordwrap($quotes[$quote], 40, "\n", 1);
$joke = explode("\n", $joke);


ImageString  ($image, 2, 12, 50, "You are $ip", $white);
ImageString ($image, 2, 12, 70,  "Your Running:", $white);
ImageString  ($image, 2, 12, 90, "$HTTP_USER_AGENT", $white);
for($i=0; $i<count($joke); $i++) {
ImageString  ($image, 2, 12, 110,  $joke[$i], $white);}
Imagepng($image);
imagedestroy($image);
?>
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.