I am having trouble finding a way to use wget to download a file from a link that uses php to point to the download. for example, if I want to write a script to download... say superantispyware portable every day so I have a fresh copy all the time (only handy if you run windows, which I don't but I digress) the download link looks like http://www.superantispyware.com/sasportable.php. I don't want the PHP file, I want the file it links to. in a browser I assume some server side magic happens to make this work. is there an incantation I can use to emulate what my browser does? can curl do this? is it impossible? I want to do this so I can update a series of programs, and as the list grows, it's becoming a real chore!
Tell me more
×
Ask Ubuntu is a question and answer site for
Ubuntu users and developers. It's 100% free, no registration required.
|
By default, the filename of the URL is used as the target filename. If redirection occurs, it is preferable to use the final filename. That can be accomplished with the
From the manual page of wget:
If the target filename is not what you intended, you can use the
|
|||
|
|
|
The "magic" is server side, not in the browser, so you just wget or curl the url. |
|||||||
|