I need a C++ function for use on Linux using G++ compiler that will download the contents of an URL.
If the URL is a web site, download the HTML file from the site.
If the URL is the location of a file, download the file from the site.
Do not use any 3rd party library, such as CURL.
## Deliverables
C++ Function Prototype:
function name - URL_Download
Function options:
URL_Download (URL to download, new name of downloaded file)
The new_name_of_downloaded_file will have the same extension of the URL to download file.?
The URL to download can be a html page, picture, video etc.