1

I use this function to load some source from another web site.

 function getWebPageSourceCurl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0'); $content = curl_exec($ch); curl_close($ch); return $content; } 

How much bandwidth do I generate to destination web site? When I call this function does server also load images or just source code.

1 Answer 1

3

This will only load the $url (presumably just the static/dynamic outputted HTML) specified, the amount of bandwidth will depend entirely on how big the page is. It's impossible to say.

Sign up to request clarification or add additional context in comments.

3 Comments

Tnx for fast replay. for example if this is page (and image is 2MB) <pre> <img src="image.jpg" /> </pre> and when i load this page is generated bandwith only length of html source (couple of bytes in this example) or html + img size
Just the few bytes of the HTML. It won't automatically open a new connection and download images etc
Tnx Dotmister, i just make test to be sure and apache acces log show that only html file is loaded.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.