cuRL returnin 404 error

后端 未结 3 1544
猫巷女王i
猫巷女王i 2020-12-06 11:23

I`m using cuRL to get some data from remote server... The response is in JSON format.. This is my code:

$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0         


        
3条回答
  •  天涯浪人
    2020-12-06 12:14

    It's possible the server check the HTTP Header, it's the case in the majority of case.

    So add the same HTTP Header of your browser, verify with Firebug :

    curl_setopt($ch, CURLOPT_HTTPHEADER, array('SomeName: SomeValue'));
    

提交回复
热议问题