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!
Load Images over FTP?
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users