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

Developers Forum

  1. Standard member Hegemon
    A Lost Bobby
    25 Dec '04 12:13
    OK, I am not very good with PHP, but am developing a clan managament tool with a MySql database. (see the Lost Bobby's clan site as to where I'm at). Unfortunately, the tool requires 100% data-entry. ie even once you have put the clan matches details in (ref id's etc), you still need to update it manually for every clan game won/lost/drawn etc.

    Not to mention individuals RHP ranking which changes every day, I'm obviously not going to type that in on a regular basis. So it would good to be able to just activate an update routine evey once in a while that just gets the data from RHP..

    Is there any way to be able to extract this information directly from RHP? If so, can anyone suggest how to go about this... I have NFI. Anyone that can provide insight I would be extremely grateful.
  2. Standard member jonbeckett73
    jonbeckett73
    29 Dec '04 22:41
    You'll need the guys who have written the RHP back end to provide an API for what you're requesting...

    The only other way is to have a copy of the schema and read access, but that is a security nightmare.

    Does no set of API calls already exist?
  3. 30 Dec '04 03:08
    Originally posted by jonbeckett73
    You'll need the guys who have written the RHP back end to provide an API for what you're requesting...

    The only other way is to have a copy of the schema and read access, but that is a security nightmare.

    Does no set of API calls already exist?
    Or you need to write a web-crawler than can scrape the data...
    I've got one, but it is written in C# and is a .net application..not php

    Tim
  4. Standard member Hegemon
    A Lost Bobby
    30 Dec '04 10:48
    thanks,
    I will ask Russ if he has anything.. I can't see myself being able to create a web-crawler without a significant learning curve. But I might see if I can find a PHP crawler already developed.
  5. 30 Dec '04 18:55
    actually the easy part is finding a web crawler. You should be able to find a class you can use in php to read external sites.

    The fun part are the regular expressions, and pattern matching you need to do to "scrape" the data out of the rhp pages.

    Tim
  6. Standard member thire
    Xebite
    31 Dec '04 14:13
    your question is quite gerneral (what exactly do you want to extract and from where, ...), but perhaps I can help you: I extracted with a php-script all the FENs of a given gameid. I mean: Give me an gameid (eg 527423) and I tell you automatically the FEN of every move.
    Read more abut it at http://www.timeforchess.com/board/showthread.php?threadid=16534 , on my website or send me a PM if you want to throw an eye on my code! I am neither a professional coder nor is the code very good, but it's done in 3 lines or so!
    th
  7. Standard member Hegemon
    A Lost Bobby
    02 Jan '05 02:01
    thanks again guys.

    I got some feedback from Russ and I think we may see some standardized xml's in the near future.

    Russ (big up thanks) gave me an xml script he had developed a while back (for name, user id rankings, wins, losses, draws and rated) and after doing a bit of "research", I modified a simple PHP4 parser script to work with it. The parser script will come in very handy.. anyone interested in seeing the code for the parser script, let me know.
    cheers
    hege
  8. Subscriber jharker
    Chess Obsessed
    05 Oct '06 06:04
    I would be very interested in seeing this, thanks.
  9. Standard member Snowman606
    Playing badly
    05 Oct '06 09:34
    Originally posted by Hegemon
    thanks again guys.

    I got some feedback from Russ and I think we may see some standardized xml's in the near future.

    Russ (big up thanks) gave me an xml script he had developed a while back (for name, user id rankings, wins, losses, draws and rated) and after doing a bit of "research", I modified a simple PHP4 parser script to work with it. The parse ...[text shortened]... andy.. anyone interested in seeing the code for the parser script, let me know.
    cheers
    hege
    Hi.

    Would it be possible to have a look at that XML script? I've something similar set up for private tournaments I run with friends and this would help keep my results pages up-to-date.

    Could you PM me the script?

    Thanks
  10. Standard member Snowman606
    Playing badly
    05 Oct '06 09:34
    Oops. Just noticed the date of the original thread.

    Oh well. If it still exists then I would still be interested.
  11. 24 Oct '06 05:44
    I know this is now wandering off topic (on a very old thread) and may have been answered in previous threads (in my defense the thread search system is god awful) .. but are there ANY open API's for RHP? Or is the only way to pull stats out to using screen scraping?
  12. Standard member XanthosNZ
    Cancerous Bus Crash
    24 Oct '06 09:02
    Originally posted by idioms
    I know this is now wandering off topic (on a very old thread) and may have been answered in previous threads (in my defense the thread search system is god awful) .. but are there ANY open API's for RHP? Or is the only way to pull stats out to using screen scraping?
    There are some like:
    http://www.timeforchess.com/xml/simple/gameswaitingcount_xml.php

    around but you'll have to dig through the archives of this forum to find them all.