Re: dynamic image via PHP problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
host78
Forum Newbie
Posts: 2
Joined: Sat May 21, 2005 2:11 pm

Re: dynamic image via PHP problem

Post by host78 »

Hello all... google recommends you for PHP so who am I to argue :wink:

I'm trying to get DYNAMIC IMAGES TO DISPLAY ON FORUM PAGES via PHP.

The images will display on .HTML pages, but will not work in the sigs or posts on forums. How do I change my coding to accomplish this or is it not possible?

Code: Select all

header(&quote;Content-type: image/png&quote;);
imagepng($image);
imagedestroy($image);
My site is http://www.pagerank11.com and I'm trying to get the page rank images to display in sigs.

You can try calling the dynamic image via this link:
http://pagerank11.com/pr.php?url=http:/ ... etwork.net

Thanks.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Moved to PHP-Code.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I believe most forum softwares require off-site linking to have an image type extension.
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

Try at the end of the image adding ?ext=.jpg or whatever.
e.g.
[img ]...image.php?ext=.jpg[ /img]
host78
Forum Newbie
Posts: 2
Joined: Sat May 21, 2005 2:11 pm

Post by host78 »

Image

^^^ Tried the .jpg ending, but no go... I'm starting to think that it's not possible?!?
hongco
Forum Contributor
Posts: 186
Joined: Sun Feb 20, 2005 2:49 pm

Post by hongco »

it is possible if you met these three conditions:

1) the owner of the website allows user post image in signature
2) the link you use must use for image tag with file having image extension. (not the one you had tried: ext=.jpg...etc)
3) back in your site, you need to allow php to be executed with extension jpg ..gif.... you can do this with htaccess.

if you fail 1 of the above, you won't be able to display your dynamic image.
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

2) the link you use must use for image tag with file having image extension. (not the one you had tried: ext=.jpg...etc)
actually, that's what I do on a few sites I go to and it works like a charm. :/
hongco
Forum Contributor
Posts: 186
Joined: Sun Feb 20, 2005 2:49 pm

Post by hongco »

that must be because the forums script see it as an image:

*.jpg

it thinks your whole link ....ext= is the name of the file :) nothing more

yah makes sense...
Post Reply