Usually, downloading data from a webpage is straight forward.
Just use your favorite tool and go (such as wget or curl).
Sometimes, however, it is not that simple - especially if the webpage requires a login (this means not sending credentials as part of the URL).
The following code does a login and then downloads a webpage from such a webpage.
It uses PhantomJS.