- Joined
- Jun 8, 2012
- Messages
- 34
- Reaction score
- 3
Title says it all.
I think we would need a little more information on what you are looking for. What kind of server are you running? And what CMS are you using?
PHP alone wouldn't do this. And yes it does matter what kind of server you are running. Are you running an oldskool server, like debbo? or are you running a server that requires an emulator and uses .swfs and MySQL? If you are running a server that uses MySQL, then you can use Javascript to loop through and refresh the online count. But that would be a big load on the webhost.It wouldn't matter "Dynamic users online count"
Auto updates without refreshing page.
PHP alone wouldn't do this. And yes it does matter what kind of server you are running. Are you running an oldskool server, like debbo? or are you running a server that requires an emulator and uses .swfs and MySQL? If you are running a server that uses MySQL, then you can use Javascript to loop through and refresh the online count. But that would be a big load on the webhost.
?? Not wrong. I develop websites for money. I am pretty advanced with PHP. PHP has never been able to update text on a website without a page reload. I would use jQuery (Javascript Library) to send an AJAX call to a PHP update script, and set the online count to that value via jQuery.Wrong php could do this if I remember.
?? Not wrong. I develop websites for money. I am pretty advanced with PHP. PHP has never been able to update text on a website without a page reload. I would use jQuery (Javascript Library) to send an AJAX call to a PHP update script, and set the online count to that value via jQuery.
I coded this just for you
Like me if it works,
if not, ill re-code it
$onlineurl = file_get_contents('ONLINE LINK HERE'); // T.EX blablabla.com/online.php? lol$result = mysql_query("SELECT * FROM server_status");$online = "Users Online!";$row = mysql_fetch_array( $result ); $image = imagecreatefrompng('images/banner.png'); $font_color = imagecolorallocate($image, 255, 0, 0); imagefttext($image, 20, 0, 417, 30, $font_color, './arial.ttf', $row['users_online']); imagefttext($image, 8, 0, 398, 45, $font_color, './arial.ttf', $online); imagefttext($image, 20, 0, 394, 77, $font_color, './arial.ttf', $num_rows); header('Content-type: image/png'); imagepng($image); imagedestroy($image);