[PHP] Dynamic Signature Help

Discussion in 'Web Programming' started by RuneOwn, Apr 5, 2007.

[PHP] Dynamic Signature Help
  1. Unread #1 - Apr 5, 2007 at 5:09 AM
  2. RuneOwn
    Referrals:
    0

    RuneOwn Guest

    [PHP] Dynamic Signature Help

    Okay, ive been trying to make some dynamic signatures for runescape. Ive been using google and ive learnt how to make dynamic signatures. The only thing is i dont have a clue of how to get the data from the runescape highscores. A bit of a nudge in the correct direction would be great. Thanks

    ~RuneOwn
     
  3. Unread #2 - Apr 5, 2007 at 9:44 AM
  4. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    [PHP] Dynamic Signature Help

    Learn sockets and open the webpage, use either regex or split the page into parts and there you have your information.
     
  5. Unread #3 - Apr 13, 2007 at 5:52 PM
  6. night
    Joined:
    Apr 21, 2005
    Posts:
    60
    Referrals:
    1
    Sythe Gold:
    5

    night Member
    Banned

    [PHP] Dynamic Signature Help

    Well I dont know, if you still need this, but:

    You first need to check if allow_url_fopen is enabled (it needs to be)

    next you can use the fopen() function to open a url so something like
    Code:
    $stats = fopen("http://hiscore.runescape.com/hiscorepersonal.ws?user1="$username, r);
    $stats2 = strip_tags($stats); 
    this strips the html/php tags the site may use. So now all you have is a bunch of text like Attack 15 Defense 25... blah blah
    then you can split it into an array using str_split($stats2); and then look at the stats you want through the array...

    you should probaby close the file too to save memory.... Hope this nudge helps, you can aim me if you need help.
     
  7. Unread #4 - Apr 13, 2007 at 7:12 PM
  8. MellowYellow
    Referrals:
    0

    MellowYellow Guest

    [PHP] Dynamic Signature Help

    What I personally would do is use regex. It'll give you more control than using a split. You can also use file_get_contents() to grab the source. I also replace the newlines in the source.

    In case you don't feel like taking on regex - which only looks difficult, but is easy - this is the search string I use for the highscores:
    /.*($skill)<\/a><\/td><td align=\"right\">([0-9,]*)<\/td><td align=\"right\">([0-9]*)<\/td><td align=\"right\">([0-9,]*).*/i

    In conjunction with preg_replace, $1 is the skill, $2 is your rank, $3 is your level, and $4 is your exp.

    Here is an example for you:
    http://script-dump.freehostia.com/data.php?user=zezima
     
  9. Unread #5 - Apr 27, 2007 at 12:50 AM
  10. Artsrun1990
    Joined:
    Jan 21, 2007
    Posts:
    191
    Referrals:
    0
    Sythe Gold:
    0

    Artsrun1990 Active Member

    [PHP] Dynamic Signature Help

    hey i tired that and it didnt work can u help me?
     
  11. Unread #6 - Apr 28, 2007 at 1:41 AM
  12. Jazz00006
    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0

    Jazz00006 Apprentice
    Visual Basic Programmers

    [PHP] Dynamic Signature Help

    how many times to i have to post this?
    http://jazz.cruels.net/ > PHP > Dynamic sig pack

    all you will ever need is in there
     
  13. Unread #7 - May 4, 2007 at 7:00 AM
  14. Repentless
    Joined:
    May 11, 2006
    Posts:
    669
    Referrals:
    3
    Sythe Gold:
    0

    Repentless Apprentice
    Banned

    [PHP] Dynamic Signature Help

    Blank when I go there :p
     
< [PHP/HTML] Form Actions. Need help! | Need a auction script. [PHP or Perl] >

Users viewing this thread
1 guest


 
 
Adblock breaks this site