Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Users online, which updates.

Zephyr Studios
Loyal Member
Joined
Feb 18, 2012
Messages
1,877
Reaction score
724
Hey guys,
Basicly I am getting tired of I need to refresh my site to see my users online (I know I can just see it via. :about, and in my emulator) but I mean when a user join I can see another users joins without refreshing my page. Does anyone have the script, and can somebody show me where to add it? I will be so happy. :D

Thanks,
Prizm
 
Joined
Jun 2, 2012
Messages
766
Reaction score
294
Look at how PhoenixPHP does it (I don't have a better example, sorry)

Didn't know PhoenixPHP did online refresh haha.

You want something like this:

Code:
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
	jQuery.noConflict();
	var auto_refresh = setInterval(function() {
		jQuery("#jQueryRefreshOnlineCount").load("online.php").fadeIn("slow");
	}, 5000); // refresh every 5000 milliseconds
</script>

<div id="jQueryRefreshOnlineCount"><?php include("online.php"); ?></div>
 
Last edited:
Upvote 0
Zephyr Studios
Loyal Member
Joined
Feb 18, 2012
Messages
1,877
Reaction score
724
Sv: Users online, which updates.

Thanks guys!

Sent from Tapatalk 2.
 
Upvote 0
Back
Top