Help with a private server on silkroad online

Discussion in 'Programming General' started by stinoke, Aug 11, 2008.

Help with a private server on silkroad online
  1. Unread #1 - Aug 11, 2008 at 4:13 PM
  2. stinoke
    Joined:
    Jul 24, 2007
    Posts:
    333
    Referrals:
    0
    Sythe Gold:
    0

    stinoke Forum Addict

    Help with a private server on silkroad online

    Hello!!

    I am GM assisstant on ECSRO, a silkroad private server, thanks to the great success of our server which is 24/7 full with 1000/1000 people capacity we are making some investments for example a better server etc.

    So now we are making a page where everyone can see how much people are on our 2 servers.

    we got a little problem with our statistic.
    At the moment we use a frame to reload the page. From now on we would like to use javascript to reload. Either we need a script which only reloads a part of the website, or (the better way) which reads out the infomation which need to get shown from a .txt-file.
    An example for the .txt-file :

    Mon Aug 11 10:38:42 2008ECSRO64310001

    I will be very glad if someone could help!!

    Thanks alot! :D

    I will reward you with 2$ or something if you want xD
     
  3. Unread #2 - Aug 11, 2008 at 5:03 PM
  4. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    Help with a private server on silkroad online

    Why is this in the Java/C# portion if it's going to be web based? (Sure Java can be used on the web, but... no)

    Code:
    <script type="text/javascript">
    function getXMLHttp()
    {
      var xmlHttp
    
      try {
        xmlHttp = new XMLHttpRequest();
      }
      catch(e) {
        try {
          xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(e) {
          try {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
          }
          catch(e) {
            return false;
          }
        }
      }
      return xmlHttp;
    }
    
    function loadit()
    {
      var req = getXMLHttp();
      req.open("GET", "file.txt", true);
      req.onreadystatechange = function()
      {
        if (req.readyState == 4) {
          document.getElementById('lolwut').innerHTML = req.responseText; 
        }
        else {
          document.getElementById('lolwut').innerHTML = "Loading..."; 
        }
        setTimeout ("loadit()", 2000); // time in milliseconds (1000 = 1 second)
      }
    </script>
    <div id="lolwut" onload="loadit()">Your browser does not support AJAX !</div>
    
    I didn't test it out, but it should work.
     
  5. Unread #3 - Aug 11, 2008 at 5:58 PM
  6. stinoke
    Joined:
    Jul 24, 2007
    Posts:
    333
    Referrals:
    0
    Sythe Gold:
    0

    stinoke Forum Addict

    Help with a private server on silkroad online

    ok thanks alot, we will try it out! :D
     
  7. Unread #4 - Aug 15, 2008 at 11:38 AM
  8. native
    Referrals:
    0

    native Guest

    Help with a private server on silkroad online

    Off-topic: Why don't you upgrade your server capacity to 2000 ? I hate waiting in lines. :p
     
< Need help.. Screen shot click of a button | What went wrong? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site