Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей.
Здесь обсуждаются безопасность, программирование, технологии и многое другое.
Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
 |
|

09.02.2009, 23:40
|
UID: 40846
USER: Tigger
Познавший АНТИЧАТ
Регистрация: 27.08.2007
Сообщений: 1,107
Провел на форуме: 5386281
Репутация:
1177
|
|
D Mak спасибо, помогло))
Но вот возник следующая проблема: запрос не отправляется! То есть пишет, чтор надо отправить но кнопка не срабатывает... Посмотрите, пожалуйста!!!
Вот код:
PHP код:
<?php
$login = 'Tigger';
$pass = 'qwerty';
set_time_limit(0);
$ua = 'User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Widows NT)';
$url = 'http://smotri.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_REFERER, "http://smotri.com/");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "login-hint53=1&back_url=&x=51&y=12&login=$login&password=$pass");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEFILE, "./cook");
curl_setopt($ch, CURLOPT_COOKIEJAR, "./cook");
$res = curl_exec($ch);
sleep(2);
curl_setopt($ch, CURLOPT_URL, "http://smotri.com/search/quick/?q=qwerty&submit_search.x=46&submit_search.y=12&type_search=1");
curl_setopt($ch, CURLOPT_REFERER, "http://smotri.com/");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEFILE, "./cook");
curl_setopt($ch, CURLOPT_COOKIEJAR, "./cook");
$res = curl_exec($ch);
preg_match_all('/NoSel" vid="(.*?)"/', $res, $link);
curl_setopt($ch, CURLOPT_URL, "http://smotri.com/video/view/?id=v429764ed59");
curl_setopt($ch, CURLOPT_REFERER, "http://smotri.com/search/quick/?q=qwerty&submit_search.x=46&submit_search.y=12&type_search=1");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_COOKIEFILE, "./cook");
curl_setopt($ch, CURLOPT_COOKIEJAR, "./cook");
$res = curl_exec($ch);
curl_setopt($ch, CURLOPT_URL, "http://smotri.com/comment/ajax/post/");
curl_setopt($ch, CURLOPT_REFERER, "http://smotri.com/video/view/?id=v429764ed59");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "type=1&id=429764&comment=Hello&key=");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEFILE, "./cook");
curl_setopt($ch, CURLOPT_COOKIEJAR, "./cook");
curl_close($ch);
echo $res;
?>
|
|
|

09.02.2009, 23:56
|
UID: 57557
USER: Chaak
Познавший АНТИЧАТ
Регистрация: 01.06.2008
Сообщений: 1,047
Провел на форуме: 5321514
Репутация:
3313
|
|
Сообщение от OnArs
Onars:
PHP код:
//http://www.login.popunder.ru/
$data="login=onars&pass=12345";
$fp = fsockopen("www.login.popunder.ru", 80, $errno, $errstr, 10);
$out = "POST leo/login.php HTTP/1.1\r\n";
$out .= "Host: www.login.popunder.ru\r\n";
$out .= "Referer: http://google.ru\r\n";
$out .= "User-Agent: Opera\r\n";
$out .= "Content-Type: application/x-www-form-urlencoded\r\n";
$out .= "Connection: close\r\n"; //connection: close всегда
$out .= "Content-Length: ".strlen($data)."\r\n\r\n";
$out .= $data; //дата должна быть после \r\n\r\n
fputs($fp, $out);
$response = '';
while(!feof($fp))
{
$response .= fgets($fp, 1024);
}
fclose($fp);
preg_match_all("/Set-Cookie: ([\s\S]+);/isU",$response,$m);
$string = join("; ", $m[1]);
$fp = fsockopen("www.login.popunder.ru", 80, $errno, $errstr, 10);
$out = "GET /leo/balans.php HTTP/1.1\r\n";
$out .= "Host: login.popunder.ru\n";
$out .= "Connection: close\r\n"; //connection: close всегда
$out .= "Cookie: $string\r\n\r\n"; //на конце \r\n\r\n
fputs($fp, $out);
$forpars = '';
while(!feof($fp))
{
$forpars .= fgets($fp, 128);
}
fclose($fp);
echo $forpars;
Спасибо, огромное тебе! Это работает, но после второго сокета я не перехожу на страницу /leo/balans.php, в чём проблема?
\r\n после каждого заголовка и \r\n\r\n после последнего
|
|
|

10.02.2009, 02:07
|
UID: 21339
USER: bxN5
Постоянный
Регистрация: 08.01.2006
Сообщений: 865
Провел на форуме: 3279330
Репутация:
343
|
|
вообщем нужно записать в файл
$f= fopen("$file","a");
$output =" " $var" "$var2" "z" "a" /n";
но дело в том что в файл нужно записывать именно с символами " т.е вид в файле:
"1" "2" "z" "a"
как я понимаю нужно заменять на код символа или хз
как правильно это реализовать?
|
|
|

10.02.2009, 02:14
|
UID: 42362
USER: 159932
Постоянный
Регистрация: 28.09.2007
Сообщений: 820
Провел на форуме: 6722038
Репутация:
1385
|
|
или так $a = ' " ';
или так $a = " \" ";
|
|
|

10.02.2009, 02:33
|
UID: 21339
USER: bxN5
Постоянный
Регистрация: 08.01.2006
Сообщений: 865
Провел на форуме: 3279330
Репутация:
343
|
|
а как быть с пробелами?
$a = ' " ';
$output = " $a mytext $a " ;
|
|
|

10.02.2009, 02:56
|
UID: 37072
USER: AFoST
Members of Antichat - Level 5
Регистрация: 28.05.2007
Сообщений: 729
Провел на форуме: 5571194
Репутация:
1934
|
|
Сообщение от bxN5
а как быть с пробелами?
$output = " $a mytext $a " ;
$output = " ".$a." mytext ".$a." "; конкатенация
__________________
Появляюсь редко. Важные дела в реале.
|
|
|

10.02.2009, 04:42
|
UID: 74399
USER: MyTHblu
Новичок
Регистрация: 21.01.2009
Сообщений: 9
Провел на форуме: 82271
Репутация:
1
|
|
помогите:
PHP код:
<?php
include ("blocks/bd.php");
$a = mysql_query ("SELECT meta_d,meta_k,text FROM avto WHERE page='news'",$db);
$end = mysql_fetch_array($a);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> <title>Untitled Document</title> </head> <body> <?php echo $end["text"]; ?> </body> </html>
Вроде бы с базой соединяется, но пишет Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in Z:\home\localhost\www\avto\2.php on line 5
не могу разобраться в чем дело, в 5 строке все правильно(((((((
|
|
|

10.02.2009, 11:06
|
UID: 66353
USER: Vinsik
Участник форума
Регистрация: 04.10.2008
Сообщений: 154
Провел на форуме: 203408
Репутация:
7
|
|
Здрасте! Помогите плииз
Есть сайт где ссылка вида
http://sayt.ru/video3456/
Надо сделать форму ввода и кнопочку скачать
для скачки ссылка будет такая
http://sayt.ru/upload/video/3456.flv
тоесть берется номер видео http://sayt.ru/video3456/
и подставляется сюда http://sayt.ru/upload/video/3456.flv
Подскажите как накодить.
|
|
|

10.02.2009, 11:37
|
UID: 66353
USER: Vinsik
Участник форума
Регистрация: 04.10.2008
Сообщений: 154
Провел на форуме: 203408
Репутация:
7
|
|
сори, дубль
|
|
|

10.02.2009, 12:26
|
UID: 37379
USER: Zedi
Постоянный
Регистрация: 06.06.2007
Сообщений: 335
Провел на форуме: 1487377
Репутация:
392
|
|
Vinsic, юзай функции explode() url_parse(), прочитай про эти функции
|
|
|
|
 |
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|