I was wondering how to simulate a curl
command in PHP
. I want to simulate this:
curl -X POST https://example.com/token\?\
client_id\=your_client_id\&\
client_secret\=your_client_secret\&\
grant_type\=client_credentials\&\
scope\=public
I tried this:
curl_setopt($s, CURLOPT_POST,array(
'client_id=my_id',
'client_secret/=my_secred',
'grant_type/=client_credentials',
'scope/=public'
));
But I didn't have any luck.