cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Curl gets a 403 but pasting into browser gets through

From: Bent Franklin <bentfranklin_at_gmail.com>
Date: Wed, 25 Mar 2009 01:03:48 -0500

A button on a page has: onclick="javascript:s_objectID='Submit
Button';". The script isn't in the page source.

I know the page I'll be redirected to. It uses the
"?foo=bar&bazz=quux" format. If the page is:

http://www.example.com/someform

I'll be redirected to:

http://www.example.com/search?foo=bar&bazz=quux

A curl directly to the final URL gets a 403. Yet I can paste the same
URL into a fresh browser (with cookies from the site having been
previously deleted) and get the right page.

How can I find out what the button does?

The site appears to use the get method in a couple of places, but not
as far as I can tell on the button. I don't see any post methods at
all in the source.

Command lines I've tried include:

$curl -o test.html 'http://www.example.com/search?foo=bar&bazz=quux'
$curl -o test.html -d foo=bar -d bazz-quux http://www.example.com/someform
$curl -o test.html -d foo=bar -d bazz-quux -G http://www.example.com/someform
$curl -o test.html -d foo=bar -d bazz-quux -G -L http://www.example.com/someform

Sorry if this is the most common question ever, but I've read the FAQ
and HTTP Scripting Tutorial and I'm still lost.

Thanks,
BentFranklin
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-03-25

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET