-1
Eai personal am new with PHP
I did a CURL:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1:5112/resultado/?id='.$id.'');
curl_setopt($ch, CURLOPT_ENCODING, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, arraY('Content-Type: application/x-www-form-urlencoded','user-agent: Mozilla/5.0 (Linux; Android 5.1.1; G011A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Mobile Safari/537.36'
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($ch, CURLOPT_PROXY, 'p.webshare.io:80');
//curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'frbeibpp-rotate:j8ywaubloau6');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$resultadodaconta = curl_exec($ch);
that sends the request to the API and returns me in json the following:
[ { "760ea20deb62c7906edae38c6f0b60e0": [ { "status": [ "Rodando" ] } ] } ]
i want while the status is running I want you to do a while
sleep
of 1 second and when the status changes to completed I want it to display the results.