I'm trying to write a script that will download all the source material from the tutorials at lazyfoo.net. An example download link for the file is
http://lazyfoo.net/downloads/index.php?file=SDLTut_lesson16
I use this command:
curl http://lazyfoo.net/downloads/index.php?file=SDLTut_lesson13 --O lesson13.zip
This gets me this response and no file:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Am I missing something obvious?
You are getting a 302 redirect. Use the -L
option
curl http://lazyfoo.net/downloads/index.php?file=SDLTut_lesson13 -L --O lesson13.zip
Also in future -v
(stands for verbose) is useful for debugging.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With