Adblock breaks this site

[PHP] World Players Grabber: Grab the number of players in all worlds.

Discussion in 'Web Programming' started by SidStudios, Apr 20, 2008.

  1. SidStudios

    SidStudios Active Member

    Joined:
    Mar 14, 2007
    Posts:
    201
    Referrals:
    0
    Sythe Gold:
    0
    [PHP] World Players Grabber: Grab the number of players in all worlds.

    Hey. I've just created a nice PHP script, in less than 50 lines of code (49, to be exact), which can leech off how many ever players there are in each world in Runescape.
    It does so in ASCENDING order, from World1 first.

    Check it out, it's just pure text with line breaks:
    Code:
    http://sidstudios.org/studios/ext/rsworld.php
    Have fun.
     
  2. Nite-Elve

    Nite-Elve Guest

    Referrals:
    0
    [PHP] World Players Grabber: Grab the number of players in all worlds.

  3. SidStudios

    SidStudios Active Member

    Joined:
    Mar 14, 2007
    Posts:
    201
    Referrals:
    0
    Sythe Gold:
    0
    [PHP] World Players Grabber: Grab the number of players in all worlds.

  4. h0ly

    h0ly Guest

    Referrals:
    1
    [PHP] World Players Grabber: Grab the number of players in all worlds.

    Well 1 major factor is the point that u can not cache, (i think lol) and that will eat up your transfer -_-

    some thing you can do is make a mysql database and store the information of the current players inside of it. then make a 2nd script that takes the database tables and strings them and echos them.

    You can make the first script with a manual or automatic with cron.
     
  5. Jazz00006

    Jazz00006 Apprentice
    Visual Basic Programmers

    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0
    [PHP] World Players Grabber: Grab the number of players in all worlds.

    Your idea sounds good, but it defeats the purpose of a live list doesn't it?
    If you want to change worlds to one thats less full it's no use having information from an hour ago, or even 5 mins ago.
     
  6. SidStudios

    SidStudios Active Member

    Joined:
    Mar 14, 2007
    Posts:
    201
    Referrals:
    0
    Sythe Gold:
    0
    [PHP] World Players Grabber: Grab the number of players in all worlds.

    I get 250 GB of transfer for $3.99 a month :p
    Each page is about 4.25KB, let's round it up to 5KB

    So, if that script is the only thing loading on my site, I can load it 52,428,800 times before I run out of bandwidth for that month. I doubt I'd get anywhere close to that much traffic in a month, but haha, you've got some good ideas there. The thing is though, if it uses cache, as Jazz said, it isn't "live" anymore. I actually don't like working with databases that much, since, if Runescape suddenly updates their World list page, unfiltered HTML will get inserted into the database, causing ugly, ugly errors.
     
  7. bardeep

    bardeep Apprentice
    Banned

    Joined:
    Dec 27, 2005
    Posts:
    880
    Referrals:
    1
    Sythe Gold:
    0
    [PHP] World Players Grabber: Grab the number of players in all worlds.


    Oh fuck how did you get that so cheap?

    Also yes that would mess up the database
     
  8. h0ly

    h0ly Guest

    Referrals:
    1
    [PHP] World Players Grabber: Grab the number of players in all worlds.

    well in my defense i have no clue wtf he wanted lol just looked at what he was doing as what proxys do.. and proxie's eat up transfer -_-. Also your overselling host probly has cpu restrictions -_-

    and Runescape current players isnt live either.

    finally the html inside the strings is not hard to remove..

    also making it inside a database isnt just of cache, you can keep the datastored and be like..
    XXXX Players online, highest today was XXXX, 24 hours ago there were exactly xxxxx players

    power of cron :D
     
  9. SidStudios

    SidStudios Active Member

    Joined:
    Mar 14, 2007
    Posts:
    201
    Referrals:
    0
    Sythe Gold:
    0
    [PHP] World Players Grabber: Grab the number of players in all worlds.

    GoDaddy never runs out of CPU power ;)

    @bardeep: I use GoDaddy's cheapest hosting plan.
     
  10. I 1337 I

    I 1337 I Guru
    Banned

    Joined:
    Aug 18, 2007
    Posts:
    1,158
    Referrals:
    1
    Sythe Gold:
    0
    [PHP] World Players Grabber: Grab the number of players in all worlds.

    Cool scripts, altoght i've seen that before.

    I still would like if u give me the code :)..
     
< Need Help with PHPbb3 --- ADMIN will be granted | Batch File Autorun upon download? HOW?! >


 
 
Adblock breaks this site