Jump to content

Recommended Posts

Hi guys,

 

I was wondering what kind of technology they use at OTList.eu to keep track of how many players are online for like 1000+ servers...

 

I know that there's this special port 7272 those game servers use as "statistics output port," but I'm not sure if it's actually a file or some other special type of technology?

 

Anyone have ideas what technology OTList.eu uses?

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/170357-otlistedu-what-kind-of-php/
Share on other sites

OTList.eu or OTList.edu? Or did you mean otslist.eu, I think so. Here is the english version otservlist.org.

 

I'm guessing these are linux servers. You can run shell_exec to get these,

 

<?php

$data = shell_exec('uptime');

$uptime = explode(' up ', $data);

$uptime = explode(',', $uptime[1]);

$uptime = $uptime[0].', '.$uptime[1];

echo "Server Name: " . $_SERVER['SERVER_NAME'] . "<br>";

echo "Server Uptime: " . $uptime . "<br>";

?>

 

Most data would be read out of a database though.

hmm, where do i specify what the target server IP is?

 

You can't, but you can do it in a method such as this:

 

<?php
$serv = "serv1";
$data = get_file_contents(uptime.php?server=$serv); // which'll return uptime
$uptime = explode(' up ', $data);
$uptime = explode(',', $uptime[1]);
$uptime = $uptime[0].', '.$uptime[1];
echo "Server Name: " . $serv . "<br>";
echo "Server Uptime: " . $uptime . "<br>";
?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.