Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 11-01-2005, 03:36 PM   #11
Baseband Member
 
amarine88's Avatar
 
Join Date: Dec 2004
Posts: 30
Default Re: 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.
__________________

__________________
Ouch, no sig pics allowed.

http://www.amarine88.com/pics/sigs/warthogsig.gif
amarine88 is offline   Reply With Quote
Old 11-02-2005, 07:08 AM   #12
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,006
Default Re: Coding Images to change

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,


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...
__________________

__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 11-02-2005, 07:55 AM   #13
Golden Master
 
Join Date: Mar 2005
Posts: 13,091
Default Re: Coding Images to change

Quote:
Originally Posted by MarxSoccer

This looks promising! I thing I shall do one as soon as I install Photoshop 7 Pro
lhuser is offline   Reply With Quote
Old 11-28-2005, 03:01 PM   #14
In Runtime
 
jamieoliver22's Avatar
 
Join Date: Apr 2004
Posts: 245
Default Re: Coding Images to change

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 is offline   Reply With Quote
Old 11-29-2005, 04:54 AM   #15
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,006
Default Re: Coding Images to change

Quote:
Originally Posted by jamieoliver22
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
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 11-29-2005, 11:48 AM   #16
In Runtime
 
jamieoliver22's Avatar
 
Join Date: Apr 2004
Posts: 245
Default Re: Coding Images to change

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 is offline   Reply With Quote
Old 11-29-2005, 09:26 PM   #17
Baseband Member
 
amarine88's Avatar
 
Join Date: Dec 2004
Posts: 30
Default Re: Coding Images to change

Quote:
Originally Posted by jamieoliver22
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......
__________________
Ouch, no sig pics allowed.

http://www.amarine88.com/pics/sigs/warthogsig.gif
amarine88 is offline   Reply With Quote
Old 11-30-2005, 06:41 AM   #18
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,006
Default Re: Coding Images to change

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.
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 11-30-2005, 09:26 AM   #19
In Runtime
 
jamieoliver22's Avatar
 
Join Date: Apr 2004
Posts: 245
Default Re: Coding Images to change

Hiya root.

The link is: http://www.yextreme.matrixnetworks.n...tground/ip.php

All I get is the red cross (Im using IE at the moment cuz im at school).

I hope you can help!
J

(PS, do I need to do something about the GD Libary?)
jamieoliver22 is offline   Reply With Quote
Old 12-01-2005, 09:35 AM   #20
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,006
Default Re: Coding Images to change

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
__________________

__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 06:18 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0