cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Need Help

From: Christopher Stone <listmeister_at_thestoneforge.com>
Date: Wed, 27 May 2015 23:04:38 -0500

On May 27, 2015, at 12:31, Sourin Maiti <sourin.maiti_at_gmail.com> wrote:
> I have a url which is working fine when i use it on browser. (not asking any user authentication) but when i use it in script I am getting below error:
>
> curl <url>

______________________________________________________________________

Hey There,

Not all websites are friendly to curl.

You might try sending a user-agent string along with your request. Something like:

curl -L --user-agent 'Opera/9.70 (Linux ppc64 ; U; en) Presto/2.2.1' <url>

It's also a good idea to try the -L switch to follow redirects.

--
Best Regards,
Chris

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-05-28