pulling plain text into something I can work with

Discussion in 'ASP General' started by middletree, Sep 29, 2004.

  1. middletree

    middletree Guest

    The site, which is almost finished, is at
    http://site234.webhost4life.com/crgmdal7/

    If you click most of the links in the gold nav bar, they will take you to
    various places within the site. But if you select the one called "Loads", it
    takes you to http://www.crgm06.com/aval.txt, which I have opened into a new
    window. As you can see, it's a plain text file, and it is on a different
    domain, which I have no control over. The data in there changes all the
    time.

    Is there a way I can import this into one of the pages I have control over,
    and parse it out and display it the way I want? I've never worked with
    importing plain text that's generated on the fly before.

    Using Classic ASP, have SQL Server or Access available, but not using it for
    anything else on the side.
    middletree, Sep 29, 2004
    #1
    1. Advertising

  2. There are probably a number of ways that you can this. The first one that
    comes to my mind, is this.

    That text file is of the fixed-length variety. If that length always stays
    the same, which I'm going to imagine it does, you could try

    1. http://www.aspfaq.com/show.asp?id=2173 to grab the text from the site
    2. Save the .ResponseText to a file using the File Scripting Object
    3. Use ADO to query out a recordset of the data.

    Check out this page about ADO and text files.
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/html/scripting03092004.asp

    Really, this .txt page you point to is an excellent candidate for RSS, but
    well, that's probably out of the scope of what you can control if that's not
    your site! :]

    Ray at work



    "middletree" <> wrote in message
    news:OLbS%...
    > The site, which is almost finished, is at
    > http://site234.webhost4life.com/crgmdal7/
    >
    > If you click most of the links in the gold nav bar, they will take you to
    > various places within the site. But if you select the one called "Loads",
    > it
    > takes you to http://www.crgm06.com/aval.txt, which I have opened into a
    > new
    > window. As you can see, it's a plain text file, and it is on a different
    > domain, which I have no control over. The data in there changes all the
    > time.
    >
    > Is there a way I can import this into one of the pages I have control
    > over,
    > and parse it out and display it the way I want? I've never worked with
    > importing plain text that's generated on the fly before.
    >
    > Using Classic ASP, have SQL Server or Access available, but not using it
    > for
    > anything else on the side.
    >
    >
    Ray Costanzo [MVP], Sep 29, 2004
    #2
    1. Advertising

  3. middletree

    middletree Guest

    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message

    > Really, this .txt page you point to is an excellent candidate for RSS, but
    > well, that's probably out of the scope of what you can control if that's

    not
    > your site! :]
    >
    > Ray at work



    I'll try your suggestions. Hope it's clear that the blue site is mine. But
    that txt one is not.

    And what's RSS?
    middletree, Sep 29, 2004
    #3
  4. "middletree" <> wrote in message
    news:e7dj%...

    >
    >
    > I'll try your suggestions. Hope it's clear that the blue site is mine. But
    > that txt one is not.


    Yes, that was clear! :]


    > And what's RSS?


    That's when a page returns data in XML format and you can, programatically,
    pull in that "data feed," and do whatever you want with it, such as applying
    an XSLT style sheet to it and displaying it, or just using the XML as a data
    source for some other purpose.

    Ray at work
    Ray Costanzo [MVP], Sep 29, 2004
    #4
  5. You could download file when a page is selected and using FSO read one line
    at a time and place it in a table.
    It looks like it is tab delimited so you could slice and dice into columns
    during table insertion.
    Or, what I would be doing is using a script to place the details in an xml
    file once a day , then reading xml file for client display.
    Don



    "middletree" <> wrote in message
    news:OLbS%...
    > The site, which is almost finished, is at
    > http://site234.webhost4life.com/crgmdal7/
    >
    > If you click most of the links in the gold nav bar, they will take you to
    > various places within the site. But if you select the one called "Loads",
    > it
    > takes you to http://www.crgm06.com/aval.txt, which I have opened into a
    > new
    > window. As you can see, it's a plain text file, and it is on a different
    > domain, which I have no control over. The data in there changes all the
    > time.
    >
    > Is there a way I can import this into one of the pages I have control
    > over,
    > and parse it out and display it the way I want? I've never worked with
    > importing plain text that's generated on the fly before.
    >
    > Using Classic ASP, have SQL Server or Access available, but not using it
    > for
    > anything else on the side.
    >
    >
    Donald Grover, Sep 29, 2004
    #5
  6. middletree

    Ria Guest

    Ria, Sep 30, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve
    Replies:
    12
    Views:
    969
    Steve
    Nov 18, 2005
  2. Replies:
    7
    Views:
    461
    Stefan Behnel
    Aug 22, 2007
  3. Alfredo Agosti
    Replies:
    3
    Views:
    336
    Aaron Bertrand - MVP
    Sep 19, 2003
  4. Replies:
    17
    Views:
    275
    Tad McClellan
    Mar 10, 2006
  5. Jake Barnes
    Replies:
    3
    Views:
    147
    Jake Barnes
    Sep 10, 2007
Loading...

Share This Page