ANTICHAT Forum
HOME FORUMS MEMBERS RECENT POSTS LOG IN  
Баннер 1   Баннер 2
НОВЫЕ ТОРГОВАЯ НОВОСТИ
loading...
Скрыть
Вернуться   ANTICHAT > ПРОГРАММИРОВАНИЕ > PHP
   
Ответ
 
Опции темы Поиск в этой теме Опции просмотра

Php авторизация на fotostrana.ru
  #1  
Старый 13.12.2009, 23:46
mandebist
Новичок
Регистрация: 10.09.2009
Сообщений: 3
С нами: 8772399

Репутация: 0
Talking Php авторизация на fotostrana.ru

Del Тему

Последний раз редактировалось mandebist; 17.12.2009 в 15:48..
 
Ответить с цитированием

  #2  
Старый 14.12.2009, 00:06
Deathdreams
Постоянный
Регистрация: 08.11.2008
Сообщений: 498
С нами: 9213376

Репутация: 278
По умолчанию

Снифер в руки , кури пакеты
 
Ответить с цитированием

  #3  
Старый 14.12.2009, 00:06
Player#1
Познающий
Регистрация: 11.11.2008
Сообщений: 77
С нами: 9208644

Репутация: 99
По умолчанию

Не знаю какие проблемы тут могут быть...
Вот пример авторизации при помощи curl:

PHP код:
function curl($url, $post)
    {
    
$ch = curl_init();  
    
curl_setopt($ch, CURLOPT_URL, $url); 
    
curl_setopt($ch, CURLOPT_HEADER, 1);
    
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
    
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
    
curl_setopt($ch, CURLOPT_REFERER, "http://fotostrana.ru/");
    
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');
    
curl_setopt($ch, CURLOPT_POST, 1);
    
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    
$res_curl = curl_exec($ch);
    
curl_close($ch); 
    return 
$res_curl;
    };

$email = "email";
$pass = "pass";
$url = "http://fotostrana.ru/user/login/";
$post = "submitted=1&user_email=".$email."&user_password=".$pass;
echo 
htmlspecialchars(curl($url, $post)); 
 
Ответить с цитированием

  #4  
Старый 14.12.2009, 01:29
mandebist
Новичок
Регистрация: 10.09.2009
Сообщений: 3
С нами: 8772399

Репутация: 0
По умолчанию

Player#1 Большое спасибо за помощь
 
Ответить с цитированием

  #5  
Старый 16.12.2009, 04:09
mandebist
Новичок
Регистрация: 10.09.2009
Сообщений: 3
С нами: 8772399

Репутация: 0
Unhappy

PHP код:
<?

set_time_limit
(0);
error_reporting(E_ERROR | E_PARSE);

function 
curl($url,$post)
    {
    
$ch = curl_init();  
    
curl_setopt($ch, CURLOPT_URL, $url); 
    
curl_setopt($ch, CURLOPT_HEADER, 1);
    
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
    
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
    
curl_setopt($ch, CURLOPT_REFERER, "http://fotostrana.ru/");
    
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');
    
curl_setopt($ch, CURLOPT_POST, 1);
    
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    
$res_curl = curl_exec($ch);
    
curl_close($ch); 
    return 
$res_curl;
    }; 

$email = "444";
$pass = "444";
$url = "http://fotostrana.ru/user/login/";
$post = "submitted=1&user_email=".$email."&user_password=".$pass;
echo 
htmlspecialchars(curl($url, $post));  

for(
$i=1;$i<99;$i) {
  
$qwe=$i++;


$url = "http://fotostrana.ru/tlogprofile/comment/add?tlogId=15540678&display=room&comment_text=test".$qwe."&ajax=true";
$res = connect($url,$post);

print 
$result;
flush();
print 
$qwe."\n";
flush();

sleep(1);
 }


?>
Немогу разобратся что нетак помогите плиз ...
 
Ответить с цитированием
Ответ



Предыдущая тема Следующая тема
Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Books PHP FRAGNATIC PHP 186 21.02.2010 02:41



Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT ™ © 2001- Antichat Kft.