Please turn on javascript in your browser to play chess.
Developers Forum

Developers Forum

  1. 06 Jul '04 02:01
    I'm building a webpage for my clan and I would like to know how I could pull the member list, victories, and losses from my RHP page. I use PHP and I'm looking for some sort of extraction script.

    But in the meantime, does anyone know of anything else?
    Does RHP offer data feeds of some sort?

    Saint George
  2. 06 Jul '04 02:14 / 1 edit
    I found this article at http://www.devhome.org/php/tutorials/webcatching.html I'll let you know what I come up with.
  3. 06 Jul '04 03:49
    I've tried fopen and readfile and get these errors:

    Warning: fopen(HTTP://www.redhotpawn.com/clan/home.php?cid=246): failed to open stream: No such file or directory in /my_server/chess/read.php on line 22

    and

    Warning: readfile(HTTP://www.redhotpawn.com/clan/home.php?cid=246): failed to open stream: No such file or directory in /my_server/chess/read.php on line 30


    what do you think?
  4. 06 Jul '04 03:54
    I got rid of the errors using this php script:

    <?

    $GrabURL = "http://www.redhotpawn.com/clan/home.php?cid=246";

    $StartHere = "www</a> </td></tr></table></center></td></tr></table>";

    $EndHere = "<a href=\"/clan/messageclan.php?cid=246\">";

    $OpenPage = fopen("$GrabURL", "r"
    $ReadPage = fread($OpenPage, 20000000);
    $GrabData = eregi("$StartHere(.*)$EndHere", $ReadPage, $PagePrint);
    fclose($OpenPage);
    echo $PagePrint[1];

    ?>

    But after I run it I get a blank page... Still working on it.
  5. Subscriber Russ
    RHP Code Monkey
    06 Jul '04 08:55
    Originally posted by Saint George
    I've tried fopen and readfile and get these errors:

    Warning: fopen(HTTP://www.redhotpawn.com/clan/home.php?cid=246): failed to open stream: No such file or directory in /my_server/chess/read.php on line 22

    and

    Warning: readfile(HTTP://www.redhotpawn.com/clan/home.php?cid=246): failed to open stream: No such file or directory in /my_server/chess/read.php on line 30


    what do you think?
    Quotes around the strings, or am I just stating the obvious here....
    -Russ
  6. Subscriber Russ
    RHP Code Monkey
    06 Jul '04 08:57
    Originally posted by Russ
    Quotes around the strings, or am I just stating the obvious here....
    -Russ
    It would probably be better for me to provide you with an XML script for this - 'screen scraping' (or whatever the HTML equivalent is called) is rather wasteful of the site's resources.

    -Russ
  7. 06 Jul '04 12:19
    that sounds even better. let's do that.
  8. 06 Jul '04 14:37
    Clans that post RHP data on their homepages should also help bump up RHP in the search engines....