
01.07.2009, 17:57
|
|
Участник форума
Регистрация: 12.03.2008
Сообщений: 254
Провел на форуме: 12333903
Репутация:
238
|
|
Ссор,насчёт куков то ступил,недосмотрел 
Вот посидел,написал норм пример,работающий,и тоже столкнулся с этой ошибкой,но решил,вся проблемя в Referer! Он должен быть вконтакте.сру/ид1234 , пример:
Referer: http://vkontakte.ru/id23316952
Ну а вот скрипт который шлёт написал
PHP код:
<?php
function curls($url,$zapros,$method){
$cookies="remixlang=0; remixmid=23316952; remixemail=zag1496@mail.ru; remixpass=4c94bf71ef857d4bb4bde227f7521610; remixsid=e4e697df775170a5f9e7587c466eba5a36ad98d05ac9bbe99c756b12";
$ref = 'http://vkontakte.ru/id23316952';
$ch=curl_init ($url);
$ua = 'Opera/9.64 (Windows NT 5.1; U; ru) Presto/2.1.1';
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_REFERER, $ref);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $PostData);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIE, $cookies);
curl_setopt($ch, CURLOPT_POSTFIELDS, $zapros);
$page = curl_exec($ch);
if($method=="1"){
preg_match("/wall_hash: '(.*?)', wpage/i", $page, $wall_hash);
preg_match("/name=\"to_id\" value=\"(.*?)\"\/>/i", $page, $to_id);
$return=array($wall_hash[1],$to_id[1]);
}else{
$return=$page;
}
return $return;
}
$cur=&curls("http://vkontakte.ru/index.php","","1");
$zapros="act=get10&wall_hash=".$cur[0]."&wpage=100000&seed=TEST&fpage=1&mid=".$cur[1]."&n=3";
$cur=&curls("http://vkontakte.ru/wall.php",$zapros,"2");
echo $cur;
?>
В куках профиль подставной,можете юзать на здоровье
|
|
|