Download a webpage from the net, but...
Hi all,
I need to download a webpage from the net, but:
1) using a custom User-Agent header,
2) with a Timeout of 60 seconds
3) without receiving cookies or cache files
4) and after it is downloaded, turn all relative URLs to absolute,
5) then parse all links and populate a ListBox control with the URLs
Anyone can help me out? :thumb:
P.S. I want to accomplish this without having to use Inet control etc.
Re: Download a webpage from the net, but...
Your solution would be to use the Winsock control, or even better, the Winsock API.
There are other solutions, such as URLDownloadToFile, or AsyncRead of a usercontrol, but they don't give you as much control.
Here's a good site about using the Winsock API . If you have the option of using the Winsock control, it would make things a lot easier/quicker.