I'm new in PHP and i want to call another external API using cURL,
with this piece of code everything is good and the result is what i need.
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $api_URL, CURLOPT_USERAGENT => 'Token cURL Request' )); $resp = curl_exec($curl); curl_close($curl);
but problem starts when i want to call a new cURL base on the previous cURL after i get result.
I think i need wait for first one to complete before starting a new one but i'm beginner in php and i don't know how i can write that.