I'm trying to make a request for the url:
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);