
21.08.2009, 18:30
|
|
Познающий
Регистрация: 29.11.2004
Сообщений: 80
С нами:
11286751
Репутация:
6
|
|
Помагите плз я новичёк
Помагите зделать чтоб скрипт нахадил ид http://web.ru/people/204410909
PHP код:
<?php
$acc = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : false;
$pass = isset($_SERVER['argv'][2]) ? $_SERVER['argv'][2] : false;
$bor_dir = dirname(__FILE__);
$inc_dir = dirname(__FILE__).'/inc/';
echo " o.O \n";
require $inc_dir.'/query.php';
$q = new HTTPQuery;
$q->UserAgent = 'Opera/9.60 (Windows NT 6.0; U; YB/3.5.1; ru) Presto/2.1.1';
$q->Referer = 'http://web.ru/';
$q->Cookies = NULL;
$q->Get('http://web.ru/');
$q->Query = Array (
'login_field' => $acc,
'password_field' => $pass,
);
$q->Post('http://web.ru/login');
$q->Cookies = $q->GetCookies();
$regexp2 = '/uid="([0-9]+)"/ism';
echo "Loading friendlist...\r";
$q->Get("http://web.ru/people");
file_put_contents($inc_dir.'/friends.html', $q->Result);
$content2 = file_get_contents($inc_dir.'/friends.html', $q->Result);
preg_match_all($regexp2, $content2, $matches, PREG_SET_ORDER);
foreach ($matches as $matchess) {
if (!in_array($matchess[1], $friends_ids))
$friends_ids[] = $matchess[1];
}
}
$friends_count_real = count($friends_ids);
echo "Friendlist loaded. $friends_count_real IDs\n";
echo " =-]]]]] \n";
?>
|
|
|