开发者

what should be the value of referer in curl_setopt in php when we are communicating with the google's search api with our own localhost server?

开发者 https://www.devze.com 2023-01-28 03:55 出处:网络
what should be the value of referer in curl_setopt in php when we are communicating with the google\'s search api with our own localhost server?

what should be the value of referer in curl_setopt in php when we are communicating with the google's search api with our own localhost server? curl_setopt($ch, CURLOPT_REFERER, $referer); usually we are placing our sitename as 3开发者_C百科'rd parameter.But what we want to put when we are running this in our local server? im using apche in ubuntu.


Why do you even care about referrer? This is totally unnecessary to set any value. The only valid reason to set referrer is when you know that program requires it and will not work without a valid referrer. The other reason people set referrer in curl is when they want to scrape web page or do other sneaky things where they trying to hide the fact that they are not accessing the page with a regular browser.

0

精彩评论

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