Hey everyone, I am trying to make a script that will work something like this:
1. User requests "img.mysite.com/hi.gif"
2. img.mysite.com will then go to "google.com/hi.gif" and it will output the image.
I have the proxy part of it down but I need help getting the script to read the "hi.gif".
Could anyone help me?
Need help creating dynamic script.Title is vague. Read inside for the details
Page 1 of 1
2 Replies - 1005 Views - Last Post: 30 December 2008 - 09:42 AM
Replies To: Need help creating dynamic script.
#2
Re: Need help creating dynamic script.
Posted 26 December 2008 - 06:02 PM
I think I could probably help you, but you're going to have to be a bit more clear. I'm not entirely sure I know what you're trying to accomplish.
#3
Re: Need help creating dynamic script.
Posted 30 December 2008 - 09:42 AM
Here's a quick example of what I think you are trying to do:
To test you would go to:
http://your.server.c...images/logo.gif
This would return to the browser:
http://www.google.co...images/logo.gif
<?php $img = $_REQUEST['img']; header('Content-type: image/gif'); print file_get_contents('http://www.google.com/'.$img); ?>
To test you would go to:
http://your.server.c...images/logo.gif
This would return to the browser:
http://www.google.co...images/logo.gif
This post has been edited by mazeroth: 30 December 2008 - 09:43 AM
Page 1 of 1