Warning: Cannot use a scalar value as an array in /home/admin/public_html/forum/include/fm.class.php on line 757

Warning: Invalid argument supplied for foreach() in /home/admin/public_html/forum/include/fm.class.php on line 770
Форумы портала PHP.SU :: Версия для печати :: помогите с post
Форумы портала PHP.SU » » Работа с сетью » помогите с post

Страниц (1): [1]
 

1. fagot - 10 Июня, 2014 - 13:03:17 - перейти к сообщению
помогите составить запрос для входа на етот сайт
http://passport[dot]vmmo[dot]ru/login[dot]html?12
пост
CODE (htmlphp):
скопировать код в буфер обмена
  1.    $post =
  2.    'action=&j_username=' . $login .
  3.   '&j_password=' . $pass .
  4.   '&openid.return_to=' . $u .
  5.   '&submit=' . "submit";  

вот полный
PHP:
скопировать код в буфер обмена
  1. <?
  2. define('PROTECTOR', 1);
  3.  
  4.  
  5.  
  6.  
  7. $textl='Герой-Бот';
  8. include('files/path.php');
  9. include($path.'files/head.php');
  10.  
  11.  
  12.  $login = htmlspecialchars(stripslashes(addslashes($_POST['log'])));
  13. $pass = htmlspecialchars(stripslashes(addslashes($_POST['pas'])));
  14.    $url = 'http://passport.vmmo.ru/login.html';        
  15.    $u="http://hata.mobi/index.php?r=site/login";
  16.    $post =
  17.    'action=&j_username=' . $login .
  18.    '&j_password=' . $pass .
  19.    '&openid.return_to=' . $u .
  20.    '&submit=' . "submit";  
  21.    $ch = curl_init();
  22.    curl_setopt($ch, CURLOPT_URL, $url)  ;        
  23.    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);      
  24.    curl_setopt($ch, CURLOPT_URL, $url);              
  25.    curl_setopt($ch, CURLOPT_COOKIEJAR, "hata.txt");  
  26.    curl_setopt($ch, CURLOPT_COOKIEFILE, "hata.txt");
  27.    curl_setopt($ch, CURLOPT_POST, true);    
  28.    curl_setopt($ch, CURLOPT_POSTFIELDS, $post);        
  29.    $html = curl_exec($ch);  
  30.    curl_close($ch);
  31. echo $html  
  32.  
  33. ?>

 

Powered by ExBB FM 1.0 RC1