Welling Posted January 12, 2009 Share Posted January 12, 2009 Currently I have a small image host on my web, and the images are showed by giving the real link to the images. But now, I'm thinking about count the times the images are viewed and don't give the real link so I think put a .php receiving all requests and this file will show the images getting them with file_get_contents(). I doubt if this will generate a high CPU usage. What do you think? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/140549-image-host-and-php/ Share on other sites More sharing options...
DeanWhitehouse Posted January 12, 2009 Share Posted January 12, 2009 that would be fine, you might also want to use PHP to reduce the image size to fit into your HTML page. Quote Link to comment https://forums.phpfreaks.com/topic/140549-image-host-and-php/#findComment-735485 Share on other sites More sharing options...
Welling Posted January 12, 2009 Author Share Posted January 12, 2009 But with too requests will it have high CPU usage? How many load can support without high CPU usage? Quote Link to comment https://forums.phpfreaks.com/topic/140549-image-host-and-php/#findComment-735514 Share on other sites More sharing options...
DeanWhitehouse Posted January 12, 2009 Share Posted January 12, 2009 I don't know an exact figure but loads, it will not be much different to people requesting the image directly through the URL. But you wouln't need to use file_get_contents(); unless you want to hide the image URL from the source code. Quote Link to comment https://forums.phpfreaks.com/topic/140549-image-host-and-php/#findComment-735516 Share on other sites More sharing options...
Welling Posted January 12, 2009 Author Share Posted January 12, 2009 But you wouln't need to use file_get_contents(); unless you want to hide the image URL from the source code. No, the images aren't for my site, it is a image host (like imageshack) people uploads the images to my web and I give them a link to use on other sites. This is why I think the load will be high Quote Link to comment https://forums.phpfreaks.com/topic/140549-image-host-and-php/#findComment-735525 Share on other sites More sharing options...
DeanWhitehouse Posted January 12, 2009 Share Posted January 12, 2009 It should be ok, but if you want to turn your site into an image hosting company like imageshack(which is the impression i am getting) then eventually you will need to get a dedicated server due to high load. But all depends on how much traffic you are planning on getting. Quote Link to comment https://forums.phpfreaks.com/topic/140549-image-host-and-php/#findComment-735531 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.