I created a users online script and was wondering how I could fetch the data from the script and print them to a non-php page.
I only included the code where it prints the data.
if ($users_online > 1) {
print "$users_online users are online.";
} elseif ($users_online == "1") {
print "$users_online user is online.";
} elseif ($users_online == "0") {
print "There are no users online.";
}
It works when just accessing the php page but... when I tried:
<script language="javascript" type="text/javascript" src="users.php">
</script>
Nothing appears.
What can I do 😕 🙁