prudens Posted August 15, 2009 Share Posted August 15, 2009 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 More sharing options...
Markh789 Posted August 15, 2009 Share Posted August 15, 2009 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. Link to comment https://forums.phpfreaks.com/topic/170357-otlistedu-what-kind-of-php/#findComment-898657 Share on other sites More sharing options...
prudens Posted August 15, 2009 Author Share Posted August 15, 2009 hmm, where do i specify what the target server IP is? Link to comment https://forums.phpfreaks.com/topic/170357-otlistedu-what-kind-of-php/#findComment-899066 Share on other sites More sharing options...
oni-kun Posted August 15, 2009 Share Posted August 15, 2009 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>"; ?> Link to comment https://forums.phpfreaks.com/topic/170357-otlistedu-what-kind-of-php/#findComment-899069 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.