Blank page request API in PHP

0

I'm trying to make a request for the url:

link

and the response in case of valid token should be true .

I have tried in many ways using Curl and GuzzleHttp , all return me a blank page . I tested token on postman and it works. I'm on the language learning curve and would like to know the simplest and most functional way and see the return on the page.

Thank you in advance.

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,"http://api.olhovivo.sptrans.com.br/v0/Login/Autenticar");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "?token=XXXX");
$result = curl_exec ($ch);
curl_close ($ch);

print_r($result);
    
asked by anonymous 01.05.2016 / 04:28

0 answers