Can servers block curl requests?

后端 未结 4 814
谎友^
谎友^ 2020-12-01 01:30

I am working on ZOHO API and trying to update the record using cURL. I tried different cURL variations, but it always returns \"false\". But when I call the same URL using a

4条回答
  •  时光取名叫无心
    2020-12-01 02:08

    To answer your question "Is there any way they can block CURL requests?": Yes, in fact one may detect a cURL request by reading the User-Agent header.

    You can change the user agent by calling curl_setopt($ch, CURLOPT_USERAGENT, 'My user agent string!');.

提交回复
热议问题