|
Познающий
Регистрация: 11.11.2008
Сообщений: 77
С нами:
9208644
Репутация:
99
|
|
Вроде так...
PHP код:
<?php
$ch = curl_init();
$head = array(
"Host: v.ru",
"Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif,
image/x-xbitmap, */*;q=0.1",
"Accept-Language: ru-RU,ru;q=0.9,en;q=0.8",
"Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1",
"Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0",
"Cookie2: $Version=1",
"Connection: Keep-Alive, TE",
"TE: deflate, gzip, chunked, identity, trailers"
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
curl_setopt($ch, CURLOPT_URL, "gr.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "to=123&pid=0");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_COOKIE, "rem=0");
curl_setopt($ch, CURLOPT_REFERER, "http://v.ru");
curl_setopt($ch, CURLOPT_USERAGENT, "Opera/9.64 (Windows NT 5.1; U; ru) Presto/2.1.1");
$result = curl_exec($ch);
curl_close($ch);
?>
|