Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Parsing the results of an .ASP page from within VC++

Parsing the results of an .ASP page from within VC++

Scheduled Pinned Locked Moved C / C++ / MFC
databasecsharpc++game-devjson
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jfugate
    wrote on last edited by
    #1

    I'm working on a kind of off-the-wall idea with a guy to setup a homegrown game finder for my software (http://www.settlers3d.net). What I'd like to do is be able to get to an .ASP page, which will have only text on it, from within the program and then parse the text. Basically, the way we're doing this is that the host player's version of the game will hit a separate.ASP page that will add the game to an Access database on the site. Then the client's game will hit the .ASP page I'm mentioning, the page will query the database and return all open games in text format so that it can be read by the client game and displayed to select from. Does anyone have any ideas where to start looking on how to parse an .ASP file from within the program?

    D 1 Reply Last reply
    0
    • J jfugate

      I'm working on a kind of off-the-wall idea with a guy to setup a homegrown game finder for my software (http://www.settlers3d.net). What I'd like to do is be able to get to an .ASP page, which will have only text on it, from within the program and then parse the text. Basically, the way we're doing this is that the host player's version of the game will hit a separate.ASP page that will add the game to an Access database on the site. Then the client's game will hit the .ASP page I'm mentioning, the page will query the database and return all open games in text format so that it can be read by the client game and displayed to select from. Does anyone have any ideas where to start looking on how to parse an .ASP file from within the program?

      D Offline
      D Offline
      Dave Bryant
      wrote on last edited by
      #2

      If you are using MFC, then you could use the CHttpConnection and CHttpFile classes to retrieve the results of the ASP page. In terms of parsing it, you are then just parsing a text stream, so i can't really help without knowing what it looks like, but it would probably be easier if the ASP page generated an XML document - you could then use an existing parser rather than having to write your own, making the whole process fairly trivial. Dave http://www.cloudsofheaven.org

      J 1 Reply Last reply
      0
      • D Dave Bryant

        If you are using MFC, then you could use the CHttpConnection and CHttpFile classes to retrieve the results of the ASP page. In terms of parsing it, you are then just parsing a text stream, so i can't really help without knowing what it looks like, but it would probably be easier if the ASP page generated an XML document - you could then use an existing parser rather than having to write your own, making the whole process fairly trivial. Dave http://www.cloudsofheaven.org

        J Offline
        J Offline
        jfugate
        wrote on last edited by
        #3

        Great, thanks. That's exactly what I was looking for. I should have dug around in MFC a little more before posting.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups