URL: https://www.opennet.ru/cgi-bin/openforum/vsluhboard.cgi
Форум: vsluhforumID8
Нить номер: 7159
[ Назад ]

Исходное сообщение
"curl авторизация"

Отправлено jonson , 01-Мрт-11 14:32 
Не могу авторизоваться, подскажите, куда смотреть?
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'index.php');
curl_setopt($curl, CURLOPT_COOKIEJAR, '/usr/home/kostik/coo.txt');
curl_setopt($curl, CURLOPT_COOKIEFILE, '/usr/home/kostik/coo.txt');
curl_setopt($curl, CURLOPT_USERAGENT, "Opera/10.00 (Windows NT 5.1; U; ru) Presto/2.2.0");
curl_setopt($curl, CURLOPT_FAILONERROR, 1);
curl_setopt($curl, CURLOPT_REFERER, 'http://www.yandex.ru/');
curl_setopt($curl, CURLOPT_TIMEOUT, 3);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, 'login=логин&password=пароль');
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
$result = curl_exec($curl);
curl_close($curl);
echo $result;

?>

страница авторизации index.php
<?php
  header('Content-Type: text/html; charset=koi8-r');
  session_start();
  ob_start();
  require("mysql.php");
  include('mainmenu.php');

  if(USER_LOGGED) {
     if(!check_user($UserID)) logout();
  ?>

скрытый текст

  <?php
  }
  else {
         include ("join.php");
}

?>

join.php
<Table>
     <tr>
         <td></td>
         <td class='fnt'>Login</td>
         <td class='fnt'>Password</td>
     </tr>
     <tr>
         <td><form method='POST' action='mainmenu.php'></td>
         <td><input type='text' name='login' size='15'></td>
         <td><input type='password' name='password' size='15'></td>
         <td><input type='submit' value='Join' name="join" style='border:1px solid black;'></td>
     </tr>
</table>
</form>


Содержание

Сообщения в этом обсуждении
"curl авторизация"
Отправлено jonson , 05-Мрт-11 17:19 
решено, в чем проблема не выяснил