PDA

Click to See Complete Forum and Search --> : Converting 'ASP' document to 'Text' document


jini
Jan 19th, 2000, 04:27 AM
I am struggling with this for 2 days any help would be appreciated.

I want to take the screenshot of the web page and store it in a text file which I can later read and access the data in it. It is an 'Active Server Page' (.asp) so what I get using 'OpenUrl' is the code with all the html tags even though I try to save it in a text file (.txt).
Can someone please help, best would be if I can get the code.

Thanks,

HarryW
Jan 19th, 2000, 06:15 AM
The whle point of an ASP document, I'm afraid, is that when you send your HTTP request to the server, the server will run the script that's embedded in the code (that's Active Server Pages, remember), and will send your browser only pure HTML. This is the very nature of ASP. Maybe the FTP protocal works differently? I've never studued it myself, but (I'm really not sure about this) maybe you can retrieve the .ASP file via FTP if the server you are connected to will let you. I don't think ASP works with FTP, only HTTP. After all, it's designed for showing webpages.

I should think OpenURL simply replicates the HTTP request that your browser sends. It probably won't work.

I hope this is of some use :)

Harry

Clunietp
Jan 19th, 2000, 11:54 AM
Is what you are trying to to Jini is to filter out all of the HTML tags?

Isn't Jini the name of the SUN technology that didn't work at Comdex? Who would really want to pay $100 to connect their toaster to the internet?

HarryW
Jan 19th, 2000, 04:12 PM
Hehee, I thought I recognised the name.

Umm, yeah. Sorry, I think I misunderstood what you wanted. I thight you wanted the script code, 'cause you said you wanted to 'get the code'. I can see that's probably not what you're after. I think there's a replace function (there is in VBScript) which you could use to replace all the tags with zero-length strings. That should get rid of the tags for you.

Clunietp
Jan 20th, 2000, 11:44 AM
Well, replace will take out the tags themselves, but you'll still have the information that was within the tags left over, giving you garbage data.

HarryW
Jan 20th, 2000, 11:57 AM
Yes, that's true.

How about you use InStr to find the less than character (< ) and then the greater then character (> ). You could record the positions of the first instance of each, and then remove the text between the two positions. If you put that in a do loop, until EOF, you should get rid of all the tags and the attributes they contain.

See if it works :)

jini
Jan 20th, 2000, 08:35 PM
Thanks Everybody,
I finally did figure out. I saved the file as an html ".htm" file and then used (OLE) Excel from my VB to load the file and it did work. Besides, it was really easy to access data it it.