Re: 403 Forbidden Error
Hans Henrik Bergan via curl-users <[email protected]>
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <CAJmy8YExRkycxoRuhn+Knq0ULFDEfHZ23q2OkhtxM7oLotV5kA@mail.gmail.com> |
That website is using a referer-check to block direct access to images. This works: curl -H 'Referer: http://gfaarchive.info/' 'http://gfaarchive.info/gfa/gfacn32/20240517T0600_cldwx_012.png' If you want to download the whole website, try wget mirror: wget --no-check-certificate --referer='http://gfaarchive.info' --mirror 'https://gfaarchive.info/gfaDisplay.php' On Fri, 17 May 2024 at 01:34, Ralph M via curl-users <[email protected]> wrote: > > On Thu, May 16, 2024 at 6:15 PM Daniel Stenberg via curl-users <[email protected]> wrote: >> >> On Thu, 16 May 2024, Geoff Sindel via curl-users wrote: >> >> > You are getting a 403. That is, you are not allowed to access that resource. >> > >> > Are you supplying any value for Authorization in the headers? >> >> Missing or wrong authorization gives you a 401. >> > > Going to that URL with a browser, I get this: > > 403 > Forbidden > Access to this resource on the server is denied! > > There's probably a cookie and/or login information missing when just trying to pull the file. I had a similar problem once with a server that wanted me to collect a frames page first, followed by frame contents in a specific order, because each frame section returned a specific cookie. It wouldn't just let me collect the main frame, I had to get headers and sidebar first. > > OP will probably need to start at the main page and craft a script to drill down to the images in the same manner as doing it via a browser. > > Ralph Mitchell > > -- > Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users > Etiquette: https://curl.se/mail/etiquette.html -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.html