Results 1 to 7 of 7

Thread: Converting 'ASP' document to 'Text' document

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    8

    Post

    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,

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Post

    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

  3. #3
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    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?

  4. #4
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Post

    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.

  5. #5
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    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.

  6. #6
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Post

    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

  7. #7

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    8

    Post

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width