Jump to content

OTList.edu < -- What kind of PHP?


prudens

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>";
?>

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.