|
| Дата |
|
USD/RUB | 89.7026 | BTC/USD | 68455.4116 |
|
|
|
Скрипты, программы и технические решения Обсуждаем скрипты, программы и новые технологии. |
13.09.2009, 15:06
|
#1
|
Senior Member
Регистрация: 29.09.2008
Сообщений: 1,660
Бабло: $211348
|
Скрипт массовой регистрации счётчиков li.ru
Ищу скрипт для массовой регистрации счётчиков liveinternet.ru - когда-то где-то видел, но найти немогу... Если у кого завалялся буду крайне благодарен!
|
|
|
13.09.2009, 17:35
|
#2
|
Senior Member
Регистрация: 06.11.2008
Сообщений: 858
Бабло: $126418
|
__________________
страдал хуйней
|
|
|
13.09.2009, 18:42
|
#3
|
Senior Member
Регистрация: 29.09.2008
Сообщений: 1,660
Бабло: $211348
ТС -->
|
ТС
Цитата:
Сообщение от CrazyStudentS_Mi}{
|
Спасибо
|
|
|
14.09.2009, 01:03
|
#4
|
Senior Member
Регистрация: 14.11.2008
Сообщений: 184
Бабло: $13920
|
PHP код:
function liveinternet ($url, $email, $password){
preg_match("/^(http:\/\/)?([^\/]+)/i",$url, $matches);
$name = $matches[2];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.liveinternet.ru/add");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, _useragent());
curl_setopt($ch, CURLOPT_COOKIE, 0);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$add = curl_exec($ch);
preg_match("#<input type=hidden name=random value=\"(.+)\">#sU", $add, $random);
preg_match("#<input type=submit name=ok value=\"(.+)\">#sU", $add, $ok);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_URL, "http://www.liveinternet.ru/add");
curl_setopt($ch, CURLOPT_REFERER, "http://www.liveinternet.ru/add");
curl_setopt($ch, CURLOPT_POSTFIELDS, "rules=agreed&www=&type=site&random=".$random[1]."&url=".urlencode($url)."&aliases=&name=".urlencode($name)."&email=".$email."&password=".urlencode($password)."&check=".urlencode($password)."&keywords=&private=on&language=ru&group=&ok=+".urlencode($ok[1]));
$step2 = curl_exec($ch);
preg_match("#<input type=hidden name=random value=\"(.+)\">#sU", $add, $random);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_URL, "http://www.liveinternet.ru/add");
curl_setopt($ch, CURLOPT_REFERER, "http://www.liveinternet.ru/add");
curl_setopt($ch, CURLOPT_POSTFIELDS, "random=".$random[1]."&rules=agreed&type=site&nick=".urlencode($name)."&url=".urlencode($url)."&name=".urlencode($name)."&email=".urlencode($email)."&password=".urlencode($password)."&check=".urlencode($password)."&keywords=&aliases=&group=&private=on&subscribe=off&www=&confirmed=+%D0%B7%D0%B0%D1%80%D0%B5%D0%B3%D0%B8%D1%81%D1%82%D1%80%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C+%3E%3E+");
curl_exec($ch);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_URL, "http://www.liveinternet.ru/add");
curl_setopt($ch, CURLOPT_REFERER, "http://www.liveinternet.ru/add");
curl_setopt($ch, CURLOPT_POSTFIELDS, "nick=".urlencode($name)."&go=+%D0%BF%D0%BE%D0%BB%D1%83%D1%87%D0%B8%D1%82%D1%8C+html-%D0%BA%D0%BE%D0%B4+%D1%81%D1%87%D0%B5%D1%82%D1%87%D0%B8%D0%BA%D0%B0+%3E%3E+");
curl_exec($ch);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_URL, "http://www.liveinternet.ru/code");
curl_setopt($ch, CURLOPT_REFERER, "http://www.liveinternet.ru/code");
curl_setopt($ch, CURLOPT_POSTFIELDS, "nick=".urlencode($name)."&sub_52=6&sub_53=6&sub_54=6&sub_11=6&sub_12=6&sub_13=6&sub_14=6&sub_15=6&sub_16=6&sub_17=6&sub_18=6&sub_19=6&sub_20=6&sub_21=6&sub_22=6&sub_57=6&sub_58=6&sub_23=6&sub_24=6&sub_25=6&type=25&sub_26=6&sub_38=6&sub_39=6&sub_40=6&sub_41=6&sub_50=6&sub_42=6&sub_43=6&sub_44=6&sub_45=6&sub_27=6&sub_28=6&sub_29=6&mode=single&js=on&invisible=off&ok=+%D0%BF%D0%BE%D0%BB%D1%83%D1%87%D0%B8%D1%82%D1%8C+html-%D0%BA%D0%BE%D0%B4+%D1%81%D1%87%D0%B5%D1%82%D1%87%D0%B8%D0%BA%D0%B0+%3E%3E+");
curl_exec($ch);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_URL, "http://www.liveinternet.ru/code");
curl_setopt($ch, CURLOPT_REFERER, "http://www.liveinternet.ru/code");
curl_setopt($ch, CURLOPT_POSTFIELDS, "nick=".urlencode($name)."type=25&sub_25=6&mode=single&menu=&line=&js=on&title=&invisible=&nick=".urlencode($name)."&tostat=+%D0%BF%D0%B5%D1%80%D0%B5%D0%B9%D1%82%D0%B8+%D0%BA+%D1%81%D1%82%D0%B0%D1%82%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B5+%3E%3E+");
$step3 = curl_exec($ch);
preg_match("#<input type=hidden name=rnd value=\"(.+)\">#sU", $step3, $rnd);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_URL, "http://www.liveinternet.ru/stat/".$name."/");
curl_setopt($ch, CURLOPT_REFERER, "http://www.liveinternet.ru/stat/".$name."/");
curl_setopt($ch, CURLOPT_POSTFIELDS, "rnd=".urlencode($rnd[1])."&need_password=yes&url=".urlencode($url)."&password=".urlencode($password)."&ok=+OK+");
$step4 = curl_exec($ch);
if (eregi($name, $step4))
{
return true;
} else {
return false;
}
curl_close($ch);
}
|
|
|
14.09.2009, 11:05
|
#5
|
Senior Member
Регистрация: 29.09.2008
Сообщений: 1,660
Бабло: $211348
ТС -->
|
ТС
ага.. это ещё круче должно быть, но не работает...
|
|
|
14.09.2009, 11:35
|
#6
|
Кролик
Регистрация: 15.08.2007
Сообщений: 297
Бабло: $37345
|
Все работает, только что проверил.
Тут не реализованна функция _useragent(), замени на свою, или вручную вбей значение
|
|
|
|