Announcement

Collapse
No announcement yet.

WebStats v0.1 - 2008-04-04

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    WebStats v0.1 - 2008-04-04

    Name: Web Stats
    Version: 0.1

    Description: WebApplication MOD for UT3 that returns current Player and Server stats in an XML format.

    Comments: Attempts to fill the gaps of the Gamespy query. Check out the homepage for more info, installation instructions and a sample of the output.

    Homepage: UT3 WebStats - Tools, Maps & Mods - Dirrtyclan's Forum
    Download: http://forum.dirrtyclan.com/upload/W...2008-04-04.zip

    Shouts out to elmuerte for his efforts with the WebAdmin which was a great help with this webapp mod...


    #2
    Ah, been waiting for someone to make this. Thanks for doing it!
    Finally i can write a small app to check my server with.

    Comment


      #3
      Thank you, already up and running.

      Comment


        #4
        Coolness. Is there a way to make it look nicer?

        Comment


          #5
          Fantastic thank you. Have it running on both my Linux Servers (FC8 and Ubuntu 7.10). Will now get the website to parse the XML file and present the full server stats. Just need to confirm players are listed when on the server. Excellent mod well done.

          Comment


            #6
            Everything working a treat thank you.

            Al - Check out http://www.swfmworld.com/Servers.aspx (It still needs a bit of tarting up)
            The XML file can be used to power a webpage. Bear in mind I query 2 XML files on mine but presentation is down to your web designer person. Ignore the server banners, they are seperate to the XML

            Comment


              #7
              Nice work mandelbug... use caution with the webpage auto refresh as it has the 'potential' to bog down your server - just keep an eye on the traffic.

              Comment


                #8
                Thank you very much, if it wasnt for your scripting to get the XML out it wouldn't have been possible. Yeah noticed it a tiny bit earlier when two of us were monitoring it. The machine its running on isnt a bad spec machine and it is connected via LAN. Feel free to use it as an example. I only finished the page late last night (hence Label at the bottom) so when I carry on tonight I will add an acknowledgemnet to you

                Comment


                  #9
                  mandelbug: That's awesome! Time to read up on XML I think

                  [edit] Also, if you could give any help on how you did that... that would be much appreciated!

                  Comment


                    #10
                    Al,

                    The page is written in ASP.NET v2 with VB.NET code running behind it. There is no reason why you couldnt run the stats page on a Windows XP SP2 box providing that you have less than 5 visitors at any one time. My Server IP addresses are dragged out of a database (allows easy changes without re-coding). I then have 3 ASP repeater controls (2 nested and 1 to contain). The "top level" repeater passes the server IP addresses to the lower controls, repeater 1 grabs all of the server details (name, game type etc) and then repeater 2 grabs the current online players and presents them to the table.

                    I use the following function to grab the data from the XML

                    Code:
                        Function ReturnPlayerStats(ByVal strIP As String) As ICollection
                    
                            Dim dt As New DataTable()
                            Dim dr As DataRow
                    
                            dt.Columns.Add(New DataColumn("playername", GetType(String)))
                            dt.Columns.Add(New DataColumn("score", GetType(String)))
                            dt.Columns.Add(New DataColumn("deaths", GetType(String)))
                            dt.Columns.Add(New DataColumn("ranking", GetType(String)))
                            dt.Columns.Add(New DataColumn("kills", GetType(String)))
                            dt.Columns.Add(New DataColumn("bot", GetType(String)))
                            dt.Columns.Add(New DataColumn("spectator", GetType(String)))
                            
                            Try
                                Dim m_xmld As XmlDocument
                                Dim m_nodelist As XmlNodeList
                                Dim m_node As XmlNode
                                'Create the XML Document
                                m_xmld = New XmlDocument()
                                'Load the Xml file
                                m_xmld.Load("http://" & strIP & "/stats/server.xml")
                                'Get the list of name nodes 
                                m_nodelist = m_xmld.SelectNodes("/ut3/server/players")
                                'Loop through the nodes
                    
                                Dim i As Integer = 0
                    
                                For Each m_node In m_nodelist
                    
                                    Do While i < m_node.ChildNodes.Count
                    
                                        dr = dt.NewRow()
                    
                                        dr(0) = m_node.ChildNodes.Item(i).ChildNodes.Item(2).InnerText
                                        dr(1) = m_node.ChildNodes.Item(i).ChildNodes.Item(4).InnerText
                                        dr(2) = m_node.ChildNodes.Item(i).ChildNodes.Item(5).InnerText
                                        dr(3) = m_node.ChildNodes.Item(i).ChildNodes.Item(10).InnerText
                                        dr(4) = m_node.ChildNodes.Item(i).ChildNodes.Item(18).InnerText
                                        dr(5) = m_node.ChildNodes.Item(i).ChildNodes.Item(16).InnerText
                                        dr(6) = m_node.ChildNodes.Item(i).ChildNodes.Item(17).InnerText
                    
                                        dt.Rows.Add(dr)
                    
                                        i = i + 1
                                    Loop
                    
                                Next
                    
                            Catch errorVariable As Exception
                                'Error trapping
                                Me.Label1.Text = errorVariable.ToString
                            End Try
                    
                            Dim dv As New DataView(dt, "", "score", DataViewRowState.CurrentRows)
                            Return dv
                    
                        End Function
                    Then once the data is returned I use the <%#Eval("goalscore")%> to display it

                    Hope that helps somewhat

                    Comment


                      #11
                      Outstanding work

                      Would be nice also to have a php frontface to parse those xml tags

                      Comment


                        #12
                        Originally posted by Executor2k View Post
                        Outstanding work

                        Would be nice also to have a php frontface to parse those xml tags
                        If I had l33t skillz in php I would do :-) Unfortunately I am an MS *****. I have dabbled with php but never gone pro

                        Comment


                          #13
                          http://forums.epicgames.com/showthread.php?t=608873

                          Might be worth checking with this as it does download the webstats to the client rather than just leaving it on the server (basically flag it as a server app)

                          Ended up rebuilding the main server onto Windows 2k3 as the Linux one suffers from ignoring client requests but the script still works a treat

                          Comment


                            #14
                            Originally posted by mandelbug View Post
                            http://forums.epicgames.com/showthread.php?t=608873

                            Might be worth checking with this as it does download the webstats to the client rather than just leaving it on the server (basically flag it as a server app)...
                            I will try that for version 0.2 - thanks

                            Comment


                              #15
                              hey guys i jus tgot a ut3 server i ughh made sure the file was in the folder.. i set the web admin and web to my ports and etc in my command line i set also AdminPassword=xxx with the rest of my command, i tried the http://myserverip:13000
                              and it came up on the web interface and asked me to login and pass.. well i tried my pass that i put on the command line and i also put in the [WebAdmin.BasicWebAdminAuth]
                              RequireUsername=moneyshot

                              and true to atth. but when i put in the pass and name it dont let me in?? what am i doing rong any one help i sene a few onhere got it to work yaw must be freaking geiouses please help!!

                              [F'R]moneyshot

                              Comment

                              Working...
                              X