Welcome to WebmasterWorld Guest from 54.226.246.160

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

redirect php document to an image

redirect php document to an image

     

shady

2:42 am on Nov 5, 2002 (gmt 0)

10+ Year Member



Rather than have <img src="http://xxx.com/image.gif> in my code, I want to create a php document which will respond with the contents of a graphic from another domain. The code I would like to see in my html document would be something like:
<img src=showimage.php?image=image.gif>

I used to do this in ASP using a response.redirect. I guess there is an equivallent in PHP?

dingman

6:11 am on Nov 5, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you really want to do this with a reidrect, look at the header() function.

You can also use PHP to output data types other than HTML, so it would be quite possible to store the image data any place you like (such as a database) and send it to the user from a php script without a redirect.

What purpose does this serve that linking the image from the other domain directly doesn't?

 

Featured Threads

Hot Threads This Week

Hot Threads This Month