joecooper Posted August 8, 2007 Share Posted August 8, 2007 Hi, im using the following code: <?php header("Content-type: image/png"); $im = imagecreatefrompng('www.externaldomain.com/image.png'); imagepng($im); imagedestroy($im); ?> this will return an image from another webhoster. the image is about 500KB. so when a user requests that page, its going like: externaldomain --> mywebserver --> user Is this using up 1mb bandwidth for my webserver, as its getting the image from the externaldomain (500kb), and then sending to user (another 500kb) = 1mb? Quote Link to comment https://forums.phpfreaks.com/topic/63891-images-and-bandwidth-question/ Share on other sites More sharing options...
trq Posted August 8, 2007 Share Posted August 8, 2007 Is this using up 1mb bandwidth for my webserver One would assume so though I'm not 100% sure. Quote Link to comment https://forums.phpfreaks.com/topic/63891-images-and-bandwidth-question/#findComment-318460 Share on other sites More sharing options...
gerkintrigg Posted August 8, 2007 Share Posted August 8, 2007 I guess all I can do is vote on this as I don't "Know" either... but I agree... I think it probably would. After all... regardless of how the image is downloaded... it's still downloaded, even if it is only to compile the image before the user downloads your page. Having said that, whether your web host's tracking software is sophisticated enough to track this kind of behind the scenes activity is questionable and I'd be tempted to ask the question... Then again... it'd just alert them to a potential flaw if they didn't pick it up. Quote Link to comment https://forums.phpfreaks.com/topic/63891-images-and-bandwidth-question/#findComment-318464 Share on other sites More sharing options...
joecooper Posted August 8, 2007 Author Share Posted August 8, 2007 i think it does aswell as i think it works like it downloads the image from the other host, and then stores it while the user downloads it, and then it deletes it. ill have to check the logs later on. although its not like it takes ages to download the image, its more or less instant. Quote Link to comment https://forums.phpfreaks.com/topic/63891-images-and-bandwidth-question/#findComment-318525 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.