Including MyBB in your PHP pages
Integrating a software into another website page sounds like a daunting task. However, it's really quite easy with MyBB. Here's all you have to do:
Above the rest of your website code, put this.
<?php
define('IN_MYBB',1);
require_once('path_to_mybb/global.php');
and with that, you have access to MyBB! you can use its $db object, $mybb->settings variables, and even $mybb->user information (given that you have a cookie domain and directory that allow your new application access to the cookies)
It's much easier than you think. Learn how to do even more integration in my next ProTip.
Written by Paul H.
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Did you know?
PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#