Using Xenforo users for external site.

Adam K M

Active member

Me and my friends are currently developing a website, and we've got Xenforo as our forums, and we want to make it so that our website can contact our Xenforo installation and:
  1. Query whether the following user is logged in on xenforo or not
  2. If they are logged in, retrieve their username
Any help is greatly appreciated!



New member

As long as you instantiate the XenForo application in your website, you should be able to get the full XenForo suite of functionality.
I work with muffin, thanks for the link! We tried implementing that script, with the xenforo files in a folder named forum and our test file in the main directory. We used the following code:

$startTime = microtime(true);
$kotomi_indexFile = "forum";
$kotomi_container = true;
$fileDir = dirname(__FILE__)."/{$kotomi_indexFile}";
require "{$fileDir}/library/Dark/Kotomi/KotomiHeader.php";
echo "
<title>kotomi test</title>
Hello world!
require "{$fileDir}/library/Dark/Kotomi/KotomiFooter.php";
When we did this, the xenforo header and footer loaded, however, the css and images all had the wrong link/src and thus did not display. For example, when we used inspect element, it had loaded the css file "css.php" instead of what should have been "forum/css.php".

You can see the actual page at
Do you have any idea why this is happening?