I need to add this code to an area of my Vbulletin header. I have read different threads on including a php file (some of which were very unlcear) and wanted to know how to do include this particular code. Any help would be greatly appreciated.
Code:
<?php
include_once ("/path/usersonline.php");
$visitors_online = new usersOnline();
if (count($visitors_online->error) == 0) {
if ($visitors_online->count_users() == 1) {
echo " " . $visitors_online->count_users() . " User Online";
}
else {
echo " " . $visitors_online->count_users() . " Users Online";
}
}
else {
echo "<b>Users online class errors:</b><br /><ul>\r\n";
for ($i = 0; $i < count($visitors_online->error); $i ++ ) {
echo "<li>" . $visitors_online->error[$i] . "</li>\r\n";
}
echo "</ul>\r\n";
}
?>