Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/63891-images-and-bandwidth-question/
Share on other sites

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.

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.

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.