ANTICHAT — форум по информационной безопасности, OSINT и технологиям
ANTICHAT — русскоязычное сообщество по безопасности, OSINT и программированию.
Форум ранее работал на доменах antichat.ru, antichat.com и antichat.club,
и теперь снова доступен на новом адресе —
forum.antichat.xyz.
Форум восстановлен и продолжает развитие: доступны архивные темы, добавляются новые обсуждения и материалы.
⚠️ Старые аккаунты восстановить невозможно — необходимо зарегистрироваться заново.
 |
|

01.08.2007, 12:48
|
|
Leaders of Antichat - Level 4
Регистрация: 11.11.2005
Сообщений: 391
Провел на форуме: 7084941
Репутация:
2277
|
|
Берете PhpMyAdmin и смотрите структуру таблицы users в phpBB - так проще, чем в коде копаться.
просто когда пользователь регается и логинится на сайте то данные о авторизации брать с таблици пхпбб..
ну а как там шифруют пасс береш в соурсах регистрации.. вообщем ИМХО проще прикрутить все к пхпбб
|
|
|

01.08.2007, 12:48
|
|
Постоянный
Регистрация: 23.03.2006
Сообщений: 977
Провел на форуме: 2976185
Репутация:
694
|
|
Нужно лишь понять принцип построения Cookies при авторизации в форуме и принцип создания сессии.
вот это я и не могу понять. (
|
|
|

01.08.2007, 12:52
|
|
Постоянный
Регистрация: 20.01.2007
Сообщений: 787
Провел на форуме: 2924346
Репутация:
1719
|
|
Сообщение от blaga
вот это я и не могу понять. (
короче я сейчас поеду со слипом встречусь =)
вечерком все сделаю, мне кажется, там несложно. состучимся.
|
|
|

01.08.2007, 13:44
|
|
Leaders of Antichat - Level 4
Регистрация: 16.01.2006
Сообщений: 1,966
Провел на форуме: 21768337
Репутация:
3486
|
|
Сообщение от n1†R0x
короче я сейчас поеду со слипом встречусь =)
Ога, если ты ещё вечером после встречи соображать сможешь 
|
|
|

01.08.2007, 15:19
|
|
Leaders of Antichat - Level 4
Регистрация: 11.11.2005
Сообщений: 391
Провел на форуме: 7084941
Репутация:
2277
|
|
вот статья с сайта пхпбб только англ
Description: Basic tutorial on how to keep sessions going across phpBB and your site
Author: A_Jelly_Doughnut
Date: Sat Oct 04, 2003 6:09 pm
Type: Tutorial
Keywords: login,integration,site
Category: Improvements
The Basics:
Borrow phpBB's session initialization code
Include common.php
Check for authorization [In this Article, just checking for login/logout status (optional)]
Session (and other required) Code:
The following code must be entered into each of the PHP pages for which you want phpBB to do sessions.
PHP код:
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
Notes:
The value of $phpbb_root_path may change (if required), as may PAGE_INDEX (if wanted). $phpbb_root_path should be a relative directory path to your phpBB page. For example, if you have the following web site directory layout:
/public_html/
../integrated
...../index.php
...../news.php
...../downloads.php
../phpBB2/
...../index.php
...../faq.php
...../memberlist.php
$phpbb_root_path for the /integrated/ directory would be
PHP код:
$phpbb_root_path = '../phpBB2/';
PAGE_INDEX is used in the View Online Page to show the user's location on the forum. It can be any of the values defined in /includes/constants.php under Код:
PHP код:
// Page numbers for session handling
Include Common.php
Done in the above code. This allows for you to use the phpBB DBAL, Templating system, Auth system, login system, and lang system.
Note: If you do this (and it is required), and your board goes down, the rest of your site will go down.
Check for Authorization(optional)
In theory, because we included common.php above we can use phpBB2's built in Authenticication system. We could do this, but it would be a lot of work. For the sake of simplicity, we'll go over how to check if the user is logged in or not, and what to do about it. First, the code to check for login status:
PHP код:
if( $userdata['session_logged_in'] )
{
[insert your HTML/PHP or whatever here]
}
else
{
echo('Please Login');
}
Notes:
You can change the error to whatever you want, even use a $lang variable.
You can also use the message_die() function for the error.
Other Notes
Although not required, it is highly recommended to append_sid() to all links in the pages. It is required that you append_sid() when linking back to the phpBB board itself.
The login HTML would be
Код HTML:
<form action="login.php" method="post"><input type="text" name="username"><br /><input type="password" name="password"><br />
<input type="submit" value="login" name="login">
</form>
[edit by wanrecords: the last code example has been slightly editted to include name="login" which is necessary for this to work. big thanks to tcalp for bringing this to our attention.]
(с) phpbb
З.Ы. мона добавить в статьи
Последний раз редактировалось halkfild; 01.08.2007 в 15:25..
|
|
|

01.08.2007, 18:03
|
|
Участник форума
Регистрация: 07.06.2006
Сообщений: 146
Провел на форуме: 1652093
Репутация:
490
|
|
http://www.php.com.ua/ru/files/scripts/
Сращиваем свой скрипт с системой аутентификации phpbb
|
|
|

01.08.2007, 19:07
|
|
Постоянный
Регистрация: 20.01.2007
Сообщений: 787
Провел на форуме: 2924346
Репутация:
1719
|
|
Добавить в статьи можно, если переведешь
PHP код:
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
в принципе, это как раз то, о чем я упоминал... данный кусок должен находиться в труе-опции условия авторизации юзера.
сейчас слил phpBB - и правда, так и есть, как я и писал.
|
|
|
|
 |
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|