Results 1 to 2 of 2

Thread: URL Blues: how to get the filename from a URL?

  1. #1

    Thread Starter
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871

    Arrow URL Blues: how to get the filename from a URL?

    I''m trying to extract the filename from a URL loaded in the Web Browser Control (e.g. 'webpage.htm'). The problem is that when pointing to a complete URL or a directory, the filename is not showed. E.g. when visiting VBF, the URL is 'http://www.vbforums.com', while you're actually visiting 'http://www.vbforums.com/index.php'.

    I need to get those 'index.*' filenames; I've tried with the 'location' object of the Web Browser Control, but it doesn't seem to be possible to retrieve the filename that way.

    So I'm hoping for other methods to retrieve the filename; can you feed a URL to the Winsock or Inet control and get the filename in return, as part of the Header info or so? Or ping out to a URL and get the filename? I'm open to any suggestion.

    This problem has been bugging me for days and the one who solves it will receive some ratings, not to mention my Eternal Gratitude...
    Last edited by TheVader; Apr 15th, 2005 at 03:09 PM.
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  2. #2

    Thread Starter
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871

    Re: URL Blues: how to get the filename from a URL?

    No Winsock guru's around?
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

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