I have a curl like this:
$t1 = time();
exec('echo $t1 >> debug');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $service);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$output = curl_exec($ch);
curl_close($ch);
$t2 = time();
exec('echo $t2 >> debug');
when i execute the url in browser it is fast enough. but this curl is much slower(about 20 seconds later). how can i make it as fast as the simple request?
also i have these results when i get the curl_getinfo:
connect_time: 0.01 //on average
total_time: 0.24 //on average