para11ax Posted July 26, 2006 Share Posted July 26, 2006 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! Quote Link to comment https://forums.phpfreaks.com/topic/15747-load-images-over-ftp/ Share on other sites More sharing options...
para11ax Posted July 30, 2006 Author Share Posted July 30, 2006 Any thoughts? If you think it can't be done just let me know and I'll just have to buy more bandwidth and go back to downloading them to the web server before displaying them. Quote Link to comment https://forums.phpfreaks.com/topic/15747-load-images-over-ftp/#findComment-65951 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.