0
curl -H 'content-type: application/json' --insecure -d '{"client_id":"w44p0d00.apps.2do2go", "client_secret":"mvlldlsfKLLSczxc12Kcks910cccs", "grant_type":"client_credentials", "scope": "anonymous"}' https://someurl.com/oauth/token
该命令行cURL完美工作。我如何在PHP中做同样的事情?命令行cURL到PHP cURL
curl_setopt($ch, CURLOPT_URL, 'https://someurl.com/oauth/token'); //this my url
curl_setopt($ch, CURLOPT_HTTPHEADER, array('content-type: application/json')); //its -H
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);