
20.08.2009, 18:44
|
|
Постоянный
Регистрация: 02.03.2008
Сообщений: 893
С нами:
9574565
Репутация:
712
|
|
PHP код:
function post($url,$post,$refer)
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4) Gecko/2008102920 AdCentriaIM/1.7 Firefox/3.0.4");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_REFERER, $refer);
curl_setopt($ch, CURLOPT_COOKIEJAR, "./cook");
curl_setopt($ch, CURLOPT_COOKIEFILE, "./cook");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
return $result;
}
Почему у меня не работаю куки на последнем Denwer'e, а на хостинге всё прекрасно работает ?
куки.txt тоже пробовал ставить не помогает 
|
|
|