[PHP] Runescape Total Players Grabber Source :)

Discussion in 'Web Programming' started by SidStudios, Feb 9, 2008.

[PHP] Runescape Total Players Grabber Source :)
  1. Unread #1 - Feb 9, 2008 at 12:04 PM
  2. SidStudios
    Joined:
    Mar 14, 2007
    Posts:
    201
    Referrals:
    0
    Sythe Gold:
    0

    SidStudios Active Member

    [PHP] Runescape Total Players Grabber Source :)

    I've just created a pretty nice script which extracts the total number of players in Runescape, using the cURL, explode, and replace functions.

    You can find it at http://hacktalk.org/forums/index.php?topic=12.0
    I've tried posting the source, but as cp_ stated, it is impossible to post raw PHP; it keeps giving me some error about newthread.php not being able to be found.

    Anyways, you don't need to log in to view it, so I see no harm in it. If you feel like supporting me, please join :)

    If you have any improvements, please post them there as I will not be monitoring this thread as often.

    Thanks,

    Sid
     
  3. Unread #2 - Feb 11, 2008 at 12:42 AM
  4. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    [PHP] Runescape Total Players Grabber Source :)

    Hm, was cURL really necessary? I believe file_get_contents() would work, saving just a few lines a some system resources...
     
  5. Unread #3 - Feb 11, 2008 at 9:47 AM
  6. Rdogg999
    Joined:
    Jan 16, 2008
    Posts:
    215
    Referrals:
    0
    Sythe Gold:
    0

    Rdogg999 Active Member

    [PHP] Runescape Total Players Grabber Source :)

    Is doesnt work for me :/
     
  7. Unread #4 - Feb 11, 2008 at 7:18 PM
  8. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    [PHP] Runescape Total Players Grabber Source :)

    Are you saving it as an html file? Or even a php file? The problem could be that you may not have PHP installed. Try looking into a host with it on. Also, if you have confirmed that you indeed are running the script on a server with PHP, check then if you have cURL enabled. Lots of free hosts have it disabled, and it may not work for you. Also, if there are any errors, it would be easier for anyone to help you.
     
  9. Unread #5 - Feb 12, 2008 at 6:39 AM
  10. SidStudios
    Joined:
    Mar 14, 2007
    Posts:
    201
    Referrals:
    0
    Sythe Gold:
    0

    SidStudios Active Member

    [PHP] Runescape Total Players Grabber Source :)

    Hmm, I tried Readfile and fread, but I didn't know about File_get_contents. I'll try that out, thanks.
     
  11. Unread #6 - Feb 12, 2008 at 7:14 AM
  12. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    [PHP] Runescape Total Players Grabber Source :)

    Hm, I guess that didn't work. File_get_contents(); kept timing out on me >_<
     
  13. Unread #7 - Feb 12, 2008 at 7:05 PM
  14. night
    Joined:
    Apr 21, 2005
    Posts:
    60
    Referrals:
    1
    Sythe Gold:
    5

    night Member
    Banned

    [PHP] Runescape Total Players Grabber Source :)

    fyi, curl is quite a bit faster than file_get_content().
     
  15. Unread #8 - Feb 12, 2008 at 10:30 PM
  16. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    [PHP] Runescape Total Players Grabber Source :)

    Fyi, file_get_contents() is faster. Curl goes through a longer process to get the page. I suppose someone should actually try testing the times, but I'm sort of lazy...
     
  17. Unread #9 - Feb 13, 2008 at 9:48 AM
  18. SidStudios
    Joined:
    Mar 14, 2007
    Posts:
    201
    Referrals:
    0
    Sythe Gold:
    0

    SidStudios Active Member

    [PHP] Runescape Total Players Grabber Source :)

    Also, cURL can be used to do a LOT more thngs than file_get_contents, but obviously this is not a scenario where we can use it.
    It's amazing how much it can do; referrer spoofing, etc :)
     
< Making Whole New Forums! Where I Begin? | Very basic Pascal >

Users viewing this thread
1 guest


 
 
Adblock breaks this site