[RELEASE] PHP Serverlist XML generator

Results 1 to 3 of 3
  1. #1
    ◝(⁰▿⁰)◜Smile◝ (⁰▿⁰)◜ Taiga is offline
    DeveloperRank
    May 2007 Join Date
    InternetLocation
    2,464Posts

    [RELEASE] PHP Serverlist XML generator

    Hi guys, I've noticed that the server list is fetched from a web server so I have written a PHP script that will generate a XML file for your. It's easy to set-up & configure. Screenshots are listed below.

    You can configure the server inside the PHP array, once you're done editing, upload the link to your server and redirect the launcher url to this file.


    Here is an example of the output:


    Have fun with it!

    CodeDragon
    Attached Files Attached Files


  2. #2
    Valued Member Angelis86 is offline
    MemberRank
    Jul 2013 Join Date
    119Posts

    Re: [RELEASE] PHP Serverlist XML generator

    Thanks, that will help peoples
    .
    I've thinked about release something like this in java to have an all in one solution.

    Angelis.

  3. #3
    Member devcod is offline
    MemberRank
    Apr 2014 Join Date
    PolandLocation
    55Posts

    Re: [RELEASE] PHP Serverlist XML generator

    Thanks for sharing!

    Personally I would just add text to variable and then output the variable instead of using XML document.
    When I this when testing:
    PHP Code:
    return "\t" '<server>' "\n" 
    "\t\t" '<id>' $server'id' ] . '</id>' "\n"
    "\t\t" '<ip>' $server'ipAddress' ] . '</ip>' "\n"
    "\t\t" '<port>' $server'portNumber' ] . '</port>' "\n"
    "\t\t" '<category sort="1">' $server'serverType' ] . ' (' $server'countryTag' ] . ')</category>' "\n"
    "\t\t" '<name raw_name="' $server'name' ] . '"><![CDATA[' $server'name' ] . ' (' $server'status' ] . ')]]></name>' "\n"
    "\t\t" '<crowdness sort="1">None</crowdness>' "\n"
    "\t\t" '<open sort="1">Low</open>' "\n"
    "\t\t" '<permission_mask>0x00000000</permission_mask>' "\n"
    "\t\t" '<server_stat>0x00000000</server_stat>' "\n"
    "\t\t" '<popup><![CDATA[Unable to access the server at this time.]]></popup>' "\n"
    "\t\t" '<language>en</language>' "\n"
    "\t" '</server>' "\n"
    It works same way, but is much shorter (I don't know if faster). It gets data from MySQL database and then do small parsing (server mode is hold as tinyint rather than string, so it converts eg. 1 to PvP). The additional parts (county tag and status) are for future use, it will be available at end of next month. Also I will remove tabs and newlines as they are not needed and it will make file size smaller and so transfer will be smaller.

    Also I am thinking about doing something for servers owners, simple and easy to use website with account management, highscores and others things. Were you thinking about doing something like this?



Advertisement