Jump to content


PHP Header proxy for images

  • Please log in to reply
2 replies to this topic

#1 yapyapayap

  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 06 October 2006 - 08:03 PM


Have a bit of a strange idea and not sure if it will work. I have tested the first bit and its ok. So if you have a Server A that called an imabe from Server B instead of calling the image though it goes like so:
<img src="getimage.php" width="274" height="199" />

This then calls a PHP script instead which i have tested and it does run the script. Now what i want to do is make it so that this script will pass back an image like its supposed. What this allows me to do then is make the script randomly pick photos from Server C and then pass them to the page on Server A.

The reason for this complicated method is because no scripting is allowed on Server A and so the only way to get random images on it is like that. Can the headers be modified so that the getimage.php script acts as a kind of proxy/image redirect ?


#2 yapyapayap

  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 06 October 2006 - 09:07 PM

Some things that i guess i should post with it. This is links that i have found a close as i can to the topic:

http://www.expertsrt...TP_headers.html  Good one on headers.
http://www.spoono.co...orial.php?id=42  On Images
http://www.webmaster...orum88/9077.htm  On Images

#3 tleisher

  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 06 October 2006 - 09:51 PM

Make the file a function.. and make it return an image name... then do this in Server A:

<img src="<?php echo getimage(); ?>" \>

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users