Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > pulling plain text into something I can work with

Reply
Thread Tools

pulling plain text into something I can work with

 
 
middletree
Guest
Posts: n/a
 
      09-29-2004
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.


 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      09-29-2004
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/de...ng03092004.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" <(E-Mail Removed)> wrote in message
news:OLbS%(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
 
 
 
middletree
Guest
Posts: n/a
 
      09-29-2004

"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?


 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      09-29-2004

"middletree" <(E-Mail Removed)> wrote in message
news:e7dj%(E-Mail Removed)...

>
>
> 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


 
Reply With Quote
 
Donald Grover
Guest
Posts: n/a
 
      09-29-2004
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" <(E-Mail Removed)> wrote in message
news:OLbS%(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
Ria
Guest
Posts: n/a
 
      09-30-2004
Hi,

>And what's RSS?


RSS is the standard for providing content headlines and summaries. It started
out for simply news publications but its use has signficantly expanded.
http://www.rss-specifications.com/everything-rss.htm

HTH

Ria

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I get plain text assigned through innerHTML to work as real Javascript? Should I use eval()? Jake Barnes Javascript 3 09-10-2007 03:59 AM
urllib2.urlopen(url) pulling something other than HTML dogatemycomputer@gmail.com Python 7 08-22-2007 06:47 AM
Pulling out lines of text from a text file poopdeville@gmail.com Perl Misc 17 03-10-2006 06:02 PM
Pulling a small text file into HTML? Easy? Bah! Steve HTML 12 11-18-2005 07:56 PM
Content from a memo field: converting the rich text into plain text Alfredo Agosti ASP General 3 09-19-2003 05:01 PM



Advertisments