开发者

How much bandwidth do I generate to destination web site with my curl code?

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜