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

Developers Forum

  1. Subscriber Russ
    RHP Code Monkey
    21 May '05 20:29
    I still am not checking in here like I should, so yet again, big apologies all round.

    I have recently provided a simple XML file for someone developing another system tray 'games waiting' alert.

    http://www.redhotpawn.com/xml/simple/gameswaitingcount_xml.php

    Please use this rather than screen scraping if you have a similar project. All others similar files supplied in the past may be phased out over time, but I will maintain this one. If you do use this, please contact me first. And please have a back off algorithm in any client - do not continually fire requests at the site.

    I have been slowed down considerably recently by taking on a bit of contract work, and just running the site itself has taken most of my spare time, but expect a sudden rush of new stuff over the summer months. (Sorry if I have made promises in the past and not delivered.)

    -Russ
  2. 23 May '05 07:02
    I'm having some trouble with this. When I hit the page in a browser it shows up but when I try to access it programmatically I get a file that says:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?><status>no session</status>

    I'm guessing that the page isn't getting the context of who I am when I hit it. I've tried passing in parameters for uid and name but it doesn't look like the page takes either.

    So anyone know how to trick the page into knowing who I am or make in know where that info is in my cookies?

    I'm doing this in C++ using winHTTP. Just starting with a sys tray app which I will hopefully expand as more of the site becomes available through XML.

    Any help would be appreciated.

    -j
  3. Subscriber Russ
    RHP Code Monkey
    23 May '05 11:05
    Originally posted by johnbart
    I'm having some trouble with this. When I hit the page in a browser it shows up but when I try to access it programmatically I get a file that says:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?><status>no session</status>

    I'm guessing that the page isn't getting the context of who I am when I hit it. I've tried passing in paramet ...[text shortened]... and as more of the site becomes available through XML.

    Any help would be appreciated.

    -j
    I will need to provide you with another script where I return a session id when an email and password are submitted. This session id will need to be provided on all further requests.

    I assume you can modify the HTTP headers in your code? Confirm this, and I will create the script mentioned above.

    -Russ
  4. 23 May '05 14:44
    Originally posted by johnbart
    I'm having some trouble with this. When I hit the page in a browser it shows up but when I try to access it programmatically I get a file that says:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?><status>no session</status>

    I'm guessing that the page isn't getting the context of who I am when I hit it. I've tried passing in paramet ...[text shortened]... and as more of the site becomes available through XML.

    Any help would be appreciated.

    -j
    I could just log in to it using post vars. named 'loginpassword' and 'loginemail'
  5. 23 May '05 17:18
    I managed to get this working without passing in parameters. It seems winHTTP is better suited for server side stuff so it doesn't handle cookies at all. I switched to winiNet and it does all the cookie magic for you.

    Is there anything else exposed via XML yet? I definately can see some potential for a RHP management tool to track all your games, etc.

    -j
  6. Subscriber Russ
    RHP Code Monkey
    24 May '05 09:17
    Originally posted by johnbart
    I managed to get this working without passing in parameters. It seems winHTTP is better suited for server side stuff so it doesn't handle cookies at all. I switched to winiNet and it does all the cookie magic for you.

    Is there anything else exposed via XML yet? I definately can see some potential for a RHP management tool to track all your games, etc.

    -j
    Not yet, but it has been my long-standing vision to open the site up to 'clients'.

    I am on this path already, but other commitments got have slowed me. Up until now I have just written scripts on request, but this will change when I standardise and documents what is available.

    -Russ