download manager + reading an upload HTML file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jonathan
    Senior Member
    • Mar 2004
    • 1229

    download manager + reading an upload HTML file?

    Basicly I got a site, which has several versions (translations) of it;
    well okay, just two right now, but planning for four total.

    Looking to track how many times each file is downloaded,
    and maybe keep the list of files in a mySQL DB so I don't have to manually edit.

    Also I've been told in an interview the stats system,
    for the game my site is a preview / future fansite of,
    will most likely output HTML files or can do so.

    Can PHP read an HTML file? because when this is released,
    I want to form a ladder sort of deal for it, where after a MP game
    is done, everyone uploads a copy of their stats file where PHP reads it,
    and updates their score accordingly-- is this possible?
    "How can someone be so distracted yet so focused?"
    - C
  • sdjl
    Senior Member
    • Mar 2004
    • 502

    #2
    Of course it's possible.

    Some functions worth looking into:

    fopen()
    readfile()
    file()
    file_get_contents()

    It would be easier to parse an XML file as it's more structured and you can tell PHP where the data will be, rather than taking in a whole load of HTML and then churning through it to get to one small piece of information.

    David

    p.s. Wouldn't this be better suited in the PHP section
    -----
    Do you fear the obsolescence of the metanarrative apparatus of legitimation?

    Comment

    • Jonathan
      Senior Member
      • Mar 2004
      • 1229

      #3
      oops
      *moves topic*
      "How can someone be so distracted yet so focused?"
      - C

      Comment

      • waltonics
        Junior Member
        • Nov 2004
        • 28

        #4
        This has been answered, but...

        Make sure your new game outputs in XML, it will be so much easier in the short term, but, more importantly in the long term you could probably figure out some pretty cool uses for that xml file.

        blah blah.

        Comment

        • Jonathan
          Senior Member
          • Mar 2004
          • 1229

          #5
          Update to this topic:

          1. I actually sold the site to DreamCatcher;
          2. I have yet to receive my two free autographed copies
          3. No idea what the MP files look like... Nobody seems to wanna talk

          May rush and grab a diff tld of it soon,
          at least when the game gets here.
          "How can someone be so distracted yet so focused?"
          - C

          Comment

          • Pedja
            Senior Member
            • Mar 2004
            • 329

            #6
            Also I've been told in an interview the stats system,
            for the game my site is a preview / future fansite of,
            will most likely output HTML files or can do so.
            If you can talk to them then insist on sometheing easier to parse. HTML will give you too much time. XML is already proposed as native solution for data exchange, so go for it. It should not be problem for them to create valid XML file no matter what platform they use for application. However, if they are not willing to do XML insist on any file format that is easy to parse.

            Comment

            Working...