Why BaseCURL locally works locally and on the server hangs?

Hello. There are two functions which are responsible for checking alive proxies:
public function run(){
 $db = db\proxy::find()->all();
 foreach ($db as $item) {
 $md=self::curl($item->ip,$item->port,'http://yoip.ru/'); 
 if ($md['http_code']>=200&&$md['http_code']<=399){
 $db= db\Proxies::find()->where(['id'=>$item->id])->one();
if(isset($db->id)){
$db->statusLive=1;
$db->save();
 print_r($db->id."through http://yoip.ru/\r\n");
}
 } else {
$md=self::curl($item->ip,$item->port,'https://2ip.ru/');
 if ($md['http_code']>=200&&$md['http_code']<=399){
 $db= db\Proxies::find()->where(['id'=>$item->id])->one();
if(isset($db->id)){
$db->statusLive=1;
$db->save();
 print_r($db->id."through https://2ip.ru/\r\n");
}
 }else {
 $db = db\Proxies::find()->where(['id' => $item->id])->one();
 if (isset($db->id)) {
 $db->statusLive = 0;
$db->save();
 print_r("not passed \r\n");
}
}
}
}
}
 private function curl($ip,$port,$url){
BaseCURL::$proxy['ip']=$ip;
BaseCURL::$proxy['port']=$port;
 return BaseCURL::makeRequest([CURLOPT_URL => $url]);
 }

Locally all works fine, but when poured on to the server then hangs at the moment
return BaseCURL::makeRequest([CURLOPT_URL => $url]);

What could be the reason if the server pings are?
July 9th 19 at 13:10
1 answer
July 9th 19 at 13:12
Solution
Found a solution
return BaseCURL::makeRequest([CURLOPT_URL => $url,CURLOPT_POST=>false,CURLOPT_COOKIE=>false,CURLOPT_COOKIEFILE=>false]);

Find more questions by tags ServersWeb DevelopmentYii