Coding Images to change

i want tp have it where anyone can set up a picture that they could put in their signature on a website that would have their gamercard in it and have their card update automatically when it changes.
 
yes, but where are the numbers coming from?
is there a page that is updated frmo the games server, or do you want to enter the information manually?

I mean look at the graphic below,
.gif


it takes the information for post count from this thread.
it shows my post count at the moment, (it's linked with the query uid).
so you could have
http://www.kathulu.co.uk/ex/cf.php?uid=amarine88

if you wanted a picture with your post count...

but, if you look at the picture for david,
his post count wouldn't appear here, because he's not posted in this thread...
 
Ive always wanted to know this myself! Just like the xFire tags, yeah.

Root, what is the code for that IP banner?

Thanks
Jamie
 
jamieoliver22 said:
Ive always wanted to know this myself! Just like the xFire tags, yeah.

Root, what is the code for that IP banner?

Thanks
Jamie
Code:
<?php
$ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];

header ("Content-type: image/png");
$im = @ImageCreateFromPNG ("php.png");
if(!$im) {

$len = 8*(strlen($ip))+6;
$hig = 16;

$img_handle = ImageCreate ($len, $hig) or die ("Cannot Create image");
$back_color = ImageColorAllocate ($img_handle, 0, 0, 0);
$txt_color = ImageColorAllocate ($img_handle, 255, 255, 255);
ImageString ($img_handle, 3, 5, 1,  "$ip", $txt_color);

ImagePng ($img_handle); }

?>

Sorry, I don't have time to comment the script, but you can look up any functions you don't understand on php.net
 
Okay, thanks.

I have added that code to an empty PHP file and have loaded it into my website. Made a blank image called "php.png" and its not working.

Can you please give me a step to step guide on how to do it?

Thanks
Jamie
 
jamieoliver22 said:
Okay, thanks.

I have added that code to an empty PHP file and have loaded it into my website. Made a blank image called "php.png" and its not working.

Can you please give me a step to step guide on how to do it?

Thanks
Jamie
yes, that would eb helpfull......
 
step by step?

Copy the text from the code box into a file called test.php

save the file

now look at it using an internet browser.

www.bath.ac.uk/~dr224/ex/test.php

(thats the exact code copied from the code given on the previous page).

perhaps you could link to where you have tried to test it and I'll see if I can see the problem.
 
yes, the GD libraries to have to be installed.

also in your PHP.ini file the output buffer has to be enabled, as the first thing sent by the webserver for a php file is text/html not graphic headers
 
Back
Top Bottom