PHP cURL how to add the User Agent value OR overcome the Servers blocking cURL requests?

前端 未结 4 1063
独厮守ぢ
独厮守ぢ 2020-12-05 10:54

I am transferring an Object Array. I have a cURL client (submitter) on own Server and listening script on other\'s Server, which one is not

4条回答
  •  失恋的感觉
    2020-12-05 11:49

      $agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)';
      $curl=curl_init();
      curl_setopt($curl, CURLOPT_USERAGENT, $agent);
    

提交回复
热议问题