Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
make outside forum dir page require phpbb login
Old 11-07-2010, 12:57 AM make outside forum dir page require phpbb login
Experienced Talker

Posts: 49
Trades: 0
situation desired

1. users go to a page outside forum directory
2. if they are logged into the forum when they visit the page, it displays
3. if they are not logged in, they are redirected to a login page


code I am trying to use that doesn't work ;

PHP Code:
        <?php
    define
('IN_PHPBB'true);
    
$phpbb_root_path './sdb/';
    
$phpEx substr(strrchr(__FILE__'.'), 1);
    include(
$phpbb_root_path 'common.' $phpEx);
     
    
// Start session management
    
$user->session_begin();
    
$auth->acl($user->data);
    
$user->setup();

    if(
$user->data['is_registered'])
    {
    Print 
"Hello, World... content of page will go here. !";

    }
    else
    {
       {
           
header'http://www.gt-6.com/sdb/viewtopic.php?f=4&t=22744&p=143475#p143475' ) ; 
        }
    }
    
?>
any ideas why it isn't working?

or how I can do this?

Last edited by dimensio; 11-07-2010 at 12:59 AM..
dimensio is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to make outside forum dir page require phpbb login
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17056 seconds with 12 queries