Jump to content

Help|SOCKETS


prowind

Recommended Posts

i built this code:

<?php
$ip = ""; 
$port = ""; 

if ($sock = @fsockopen($ip, $port, $num, $error, 5)) { 
echo '<B><FONT COLOR=lime>Online</b></FONT>'; 

}
else{ 
echo '<B><FONT COLOR=red>Offline</b></FONT>'; 
fclose($sock); 
} 
?>

 

this code shows me if the server is online or offline.

 

i want to use this code on servers..

the code works fine but

i want to show how many players

are online!

 

how do i do that

Link to comment
https://forums.phpfreaks.com/topic/195944-helpsockets/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.