Redirecting Servers

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
asterix299
Forum Newbie
Posts: 7
Joined: Sun Jan 03, 2010 9:02 pm

Redirecting Servers

Post by asterix299 »

Hello. I am trying to block user knowledge of my pictures server. I have a separate server that has fast internet connection to send large graphics that are used in my pages. These pictures are linked to in multiple places through simple img tags. I would like, however, for these images to be sent to the page in a way that makes it seem as though the pictures are on my server but are still being transferred to them from the pictures server.

The pictures can never be tunneled through the executing php server as its connection will not support large files.
I cannot execute php code on the pictures server.

I was thinking that I could have the img tags link to a php document that facilitates the image transfer. Is it possible to have this code get my picture server to send the image directly to the user's browser instead of having to pull the image from the server and then upload it?

I realize a smart user could figure out where the pictures would be coming from through this method, I just don't want the address listed in the img tag so openly.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Redirecting Servers

Post by requinix »

If you want it to look like your site is handling the images then a DNS solution would be best.
Pick a subdomain like "images", and have that DNS entry point to the server that actually has the images.
The browser/client will never know the difference.
Post Reply