How can I download a URL irregardless of whether it starts with http and or https (and assuming I don't know which it is)

  • Thread starter Thread starter Gidmaestro
  • Start date Start date
G

Gidmaestro

Guest
Suppose a user types in a URL into my program such as:

www.townhall.com/trump_is_super.htm

Given that URL, I don't know if the site uses SSL and therefore starts with https, or whether it starts with http.

Is there a way to download the webpage, given that I don't know this information? (Actually, even if I knew the domain used SSL, I'm not sure I could always download the page, so a code sample would be much appreciated).

Continue reading...
 
Back
Top