If you have an existing website, you may want to use phpBB3's sessions with your site. Why? Well, you can check to see if the user is logged in, what permissions the user has, and more. Note: this article is for integration into your existing site -- if you just need to make another web page that looks like phpBB3, see this article: Add a New Custom Page to phpBB

Let's get started.

Step 1

The first step in integrating phpBB3 into your site is to rename your existing file's extension (if necessary) to .php -- for example you would need to rename mypage.html to mypage.php Of course, this will break any existing links so be sure to update your links to point to the new mypage.php file.

Step 2

You will need to add this code at the top of every page you want to add phpBB's sessions into.

And that's all! Now you have full access to the phpBB sessions information.

Step 3 -- examples

Checking to see if a user is logged in

A very simple example to see if the user is logged in -- if he or she is logged in, a thank you message is displayed along with their username, but if they are not logged in, a message is displayed asking them to login.