• Log in or sign up for an account here: https://www.sythe.org/login

Help with a private server on silkroad online

stinoke

Forum Addict
Joined
Jul 24, 2007
Sythe Gold
0
Messages
333
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
 
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.
 
ok thanks alot, we will try it out! :D
 
Off-topic: Why don't you upgrade your server capacity to 2000 ? I hate waiting in lines. :p
 
Runescape Gamblingrunescape gambling
Back
Top