The online racing simulator
Server to Website?
(3 posts, started )
Server to Website?
I have a question. Is there any possible way to put on a website like a server viewer? Like how some games you can go to a website and put in ip, game, and server name etc. Is there a way to do that with LFS?
It could be done, and infact it has been done.

With the LFSWorldSDK you could call the get_hosts function and then find the host that matches your server name.

An example of that would be.


<?php 
php
    define
(name'servernamehere');
    include(
'LFSWorldSDK.php');
    
$SDK = new LFSWorldSDK('idk');
    foreach (
$SDK->get_hosts() as $host) {
        if (
$host['HOSTNAME'] == name) {
            
$j count($host['RACERNAMES']);
            foreach (
$host['RACERNAMES'] as $i => $racer) {
                if (
$i != $j) {
                    echo 
$racer ', ';
                else
                    echo 
$racer;
            }
        }
    }

?>

Not tested, but should work.
ok thanks i will try that soon!

Server to Website?
(3 posts, started )
FGED GREDG RDFGDR GSFDG