Код: Выделить всё
$url = ........
$curl_data = array('name'=>$name);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_data);
$output = curl_exec($ch);
$info = curl_getinfo($ch, CURLINFO_HTTP_CODE);
Через день я решил добавить эту строку перед вызовом функции:
curl_setopt ($ch,CURLOPT_FOLLOWLOCATION,истина);
Подробнее здесь: https://stackoverflow.com/questions/310 ... moved-here
Мобильная версия