Jump to content

Load Images over FTP?


para11ax

Recommended Posts

I'll field another open-ended question that I have been tangling with for a while:  Is there some way that I can display images off of a FTP server to a user without taking up my sites bandwidth or hitting a connection cap on the FTP server?

The situation is that I have a game server that takes random in-game screenshots.  I want to let users see these screenshots from my website on a different server.  I have FTP access to the server, but there is no public HTTP server on it so that I could simply link the files without regard for anything.  The way I see it there are two options and each has a downside that I've seen.

1) Download the screenshots via ftp() to my web server and then display them from there.  This opens a single ftp connection and streams them down.  BUT, this consumes a HUGE amount of bandwidth as hundreds are taken a day at around 100-200KB each.

2) Show them via links to the ftp server in the form of ftp://user:password@folder/file.png.  This consumes no bandwidth on my web server, BUT I have recently run into problems with FTP connection limits.  I show 25 screenshots per page in my script to view the images, but on average half show up as deadlinks.  If you use IE and click Show Image, the image will load.  I tracked down the problem and it is the limit on the number of concurrent FTP connections.  My game server sees this at 25 separate connections and disallows some.  If the user manually tries to load it with Show Image it later works since there are no more connections.

So, basically I'm looking for some php function or extension that could help to give me the best of both worlds.  Stream all of the images over one FTP connection, but don't download them to my website (thus, not bandwidth consumption).  Is there some way to do this?  Perhaps some way to load the images into the user's temporary cache before the php finishes and outputs the HTML?

Thanks for any input!
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.