Results 1 to 16 of 16

Thread: Timer 4 Runite

  1. #1
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default Timer 4 Runite

    Can anyone make this timer on PHP
    [textbox] [submit] [timertext]
    [textbox] you enter world number
    [submit] submit key
    [timertext] shows how much time left

    formula

    (1290.0 - ((worldPlayersAmount) / 100.0 - 2.0) * 30.0));

    worldPlayersAmount == [textbox] (entered world number players amount)

    page from where need to get world players amount
    http://www.runescape.com/slu.ws
    Last edited by Laimonas171; 07-02-2009 at 03:58 PM.

  2. #2
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    anyone...

  3. #3
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What language?

  4. #4
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    "Can anyone make this timer on PHP"

  5. #5
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It was not like that before.

  6. #6
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    His post -
    Last edited by Laimonas171; Yesterday at 08:58 AM.

    Your post -
    Today, 02:07 PM

    He edited it with that edit, so yes, it was there.

  7. #7
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    so it should be on PHP how i was said, how i see anyone can't or just don't want to help . :/

  8. #8
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by 99_ aka ian. View Post
    His post -
    Last edited by Laimonas171; Yesterday at 08:58 AM.

    Your post -
    Today, 02:07 PM

    He edited it with that edit, so yes, it was there.
    I saw this before, I just didn't post...

    So I don't assume that he would randomly edit it. That is why I skipped over it.

  9. #9
    Join Date
    Dec 2008
    Location
    In a galaxy far, far away...
    Posts
    584
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This shouldn't be too hard You can easily get the file contents with using file_get_contents() and search for appropriate fields and get the amount of players Using the formula would be like eating cake

    I can do this for you when I get home.



    ~NS

  10. #10
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Nadeem View Post
    This shouldn't be too hard You can easily get the file contents with using file_get_contents() and search for appropriate fields and get the amount of players Using the formula would be like eating cake

    I can do this for you when I get home.



    ~NS
    oh man I'll be very thankful I'll w8 your code.

  11. #11
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    PHP Code:
    <?php

    $data  
    file_get_contents("http://www.runescape.com/slu.ws?order=WMLPA");
    $search strstr($data"World 20");
    $players substr($search234);
    echo 
    $players;

    ?>
    It write value but, not for all world properly, example if world is FULL, then it takes wrong values, or something like that, can anyone make code working on all worlds.

  12. #12
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    if ($players=='FULL')
    $players = '2000';

    ?

  13. #13
    Join Date
    Dec 2008
    Location
    In a galaxy far, far away...
    Posts
    584
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here you go, as promised

    PHP Code:
    <?php

    if (isset($_POST["getPlayers"])) {
        if (!
    $_POST["world"])
          echo 
    "Please enter world number";
        else {
            
    $world   $_POST["world"]; 
            
    $data    file_get_contents("http://www.runescape.com/slu.ws?order=WMLPA");
            
    $search  strstr($data"World {$world}");
            
    $players substr($search21 strlen($world), 4);
            
    $players trim($players);
            
    $players = (is_numeric($players) ? $players 2000);

            echo 
    $players." players";
        }
    }

    print <<<EOD
      <form action="" method="post">
        <label for="world">World:</label>
        <input type="text" name="world" value="
    {$_POST["world"]}" />
        <input type="submit" name="getPlayers" value="Get Players" />
      </form>
    EOD;
    ?>



    ~NS

  14. #14
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Nadeem View Post
    Here you go, as promised

    PHP Code:
    <?php

    if (isset($_POST["getPlayers"])) {
        if (!
    $_POST["world"])
          echo 
    "Please enter world number";
        else {
            
    $world   $_POST["world"]; 
            
    $data    file_get_contents("http://www.runescape.com/slu.ws?order=WMLPA");
            
    $search  strstr($data"World {$world}");
            
    $players substr($search21 strlen($world), 4);
            
    $players trim($players);
            
    $players = (is_numeric($players) ? $players 2000);

            echo 
    $players." players";
        }
    }

    print <<<EOD
      <form action="" method="post">
        <label for="world">World:</label>
        <input type="text" name="world" value="
    {$_POST["world"]}" />
        <input type="submit" name="getPlayers" value="Get Players" />
      </form>
    EOD;
    ?>



    ~NS
    thank you works great

  15. #15
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Nadeem View Post
    Here you go, as promised

    PHP Code:
    <?php

    if (isset($_POST["getPlayers"])) {
        if (!
    $_POST["world"])
          echo 
    "Please enter world number";
        else {
            
    $world   $_POST["world"]; 
            
    $data    file_get_contents("http://www.runescape.com/slu.ws?order=WMLPA");
            
    $search  strstr($data"World {$world}");
            
    $players substr($search21 strlen($world), 4);
            
    $players trim($players);
            
    $players = (is_numeric($players) ? $players 2000);

            echo 
    $players." players";
        }
    }

    print <<<EOD
      <form action="" method="post">
        <label for="world">World:</label>
        <input type="text" name="world" value="
    {$_POST["world"]}" />
        <input type="submit" name="getPlayers" value="Get Players" />
      </form>
    EOD;
    ?>



    ~NS
    Hello, maybe you able make 10-20 diferend same forms, for using some worlds on the same time, and make timer for $timeLeft -1000ms, auto refreshing can be php or js, if you able to do that.

  16. #16
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    header('refresh:SECONDS') if a get or post variable is set..?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •