Home > Archive > dBASE Windows API > August 2005 > Web address -URL









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Web address -URL
Ira Berkowitz

2005-08-27, 1:23 pm

I would like to "capture" the URL from a web page and automatically place it in an entryfield on a form. Can this be done?
Christian K

2005-08-29, 8:25 pm

Last time I did something like this, I had to:
1) Download the webpage to a file. I used URLMON.DLL---
EXTERN culong URLDownloadToFile(cp
tr,cstring,cstring,;

culong,culong) URLMON.DLL from "URLDownloadToFileA"

2) I parsed the text file to find the URL I needed from the page. This
turned out to be tricky, since the page is dymanically generated, and
very frequently changes, so I actually have to rewrite my code every
once in awhile to change what the parsing function is looking for.

Ira Berkowitz

2005-08-29, 8:25 pm

I was actually looking to capture the URL in the address box located at the top of the browser


Christian K Wrote:

> Last time I did something like this, I had to:
> 1) Download the webpage to a file. I used URLMON.DLL---
> EXTERN culong URLDownloadToFile(cp
tr,cstring,cstring,;

> culong,culong) URLMON.DLL from "URLDownloadToFileA"
>
> 2) I parsed the text file to find the URL I needed from the page. This
> turned out to be tricky, since the page is dymanically generated, and
> very frequently changes, so I actually have to rewrite my code every
> once in awhile to change what the parsing function is looking for.
>


Dan Barbaria

2005-08-31, 9:28 am


"Ira Berkowitz" <irany@att.net> wrote in message
news:yratmhyqFHA.1044@news-server...
>I would like to "capture" the URL from a web page and automatically place
>it in an entryfield on a form. Can this be done?


Is the browser on your form?

Dan Barbaria


Christian K

2005-08-31, 11:23 am

Haven't done this myself because it gets very tricky when you find out
that each browser requires a different methodology, but here are some
examples in VB that use WinAPI to get you started:

http://www.visualbasicforum.com/t129988.html (overall-code at bottom)
http://dotnetforums.net/showthread.php?t=89758 (ie)
http://www.dotnetforums.net/showthread.php?t=83683 (mozilla)


Let us know how it works out for you...


Cheers,
Christian K.




Ira Berkowitz wrote:
[color=darkred]
> I was actually looking to capture the URL in the address box located
> at the top of the browser
>
>
> Christian K Wrote:
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com