The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

форумы  помощь  поиск  регистрация  майллист  вход/выход  слежка  RSS
"curl авторизация"
Вариант для распечатки  
Пред. тема | След. тема 
Форум WEB технологии (PHP)
Изначальное сообщение [ Отслеживать ]

"curl авторизация"  +/
Сообщение от jonson email(??) on 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>

Ответить | Правка | Cообщить модератору

Оглавление

Сообщения по теме [Сортировка по времени | RSS]


1. "curl авторизация"  +/
Сообщение от jonson email(??) on 05-Мрт-11, 17:19 
решено, в чем проблема не выяснил
Ответить | Правка | ^ к родителю #0 | Наверх | Cообщить модератору

Архив | Удалить

Рекомендовать для помещения в FAQ | Индекс форумов | Темы | Пред. тема | След. тема




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру