PDA

View Full Version : Parse Server list.


homer09001
05-28-2008, 11:36 AM
Forgive me if i have posted this in the wrong forum, but everyone on this board is so hopefull regardless of problem.

anyway, what im trying to do i parse the contents of a CGI script on a remote server:
http://www.chocolatesoftware.com/cgi-bin/fshost_master.cgi

This file contains a list of all FSHost Game Servers, according the the creator of the software, the data is stored in XML, which i know zilch about.

i understand parts of each server line:
e.g.
Server|91.121.12.187|80|6156753F-6DAA-4E88-8F-19-F4-8B-44-F0-08-B1|67DEDD4E-70C8-4AE0-B1-DC-9D-AA-F4-5C-F8-5F
91.121.12.187 is the ip
i believe "80" is the port

the 2 values after im not sure about, there should be in there Number of players, Server Name and Server description.

my questions is how can i turn the 2 values into a readable string?

FishMonger
05-28-2008, 06:32 PM
That's not an XML formatted file, it's a pipe delimited file. The creator of that site made a common beginners error of putting a config/log file in the cgi-bin directory.

Based on the header lines in that file, I'd say that those 2 fields you're interested in is a path/filename that has been encoded. It doesn't appear to me that you were meant to have access to that file or the meaning of its contents. If you do have a legit reason for having it, I'm sure the creator of the site would be happy to explain those fields.