Re: CURL - what am I doing wrong?
Re: CURL - what am I doing wrong?
- Subject: Re: CURL - what am I doing wrong?
- From: Daniel Jalkut <email@hidden>
- Date: Thu, 01 Dec 2005 11:22:02 -0500
Hi Hanaan. I think you should look at the actual headers that are
going out over the wire, and tweak your CURL request to match the
Safari-based request more and more until it works.
For instance, in glancing at the headers included by Safari's POST, I
see that there is a cookie involved. Not sure if this is the problem
or not, but it might be.
This is a black art and it really requires getting comfortable with
monitoring everything at the protocol level. That's a bit harder at
first but ultimately it makes things much quicker than trying to
guess the right solution.
If you didn't check it out the last time I posted about it here, you
might be interested in my write-up on using Curl to fool a site into
thinking you're a web browser:
http://www.red-sweater.com/blog/?p=50
Daniel
On Dec 1, 2005, at 10:25 AM, Hanaan Rosenthal wrote:
Steve,
Thanks so much for looking into it.
The result is the same page with the form on it instead of the page
with the final answer (Valid/Not valid...)
My guess is that they have some form element in a comment that
doesn't show on the HTML source, but is required for successful
submission of the form.
If there are any other ideas out there I would love to hear.
This is not for a paying client, at this point it's just a battle
to get the result and help someone out, and the other side's server
seems to be winning :-(
Thanks,
Hanaan
On Dec 1, 2005, at 9:47 AM, Steve Hayman wrote:
Hi Hanaan. I took a look with "curl -v" to see more detail of the
conversation with the server - the response from the server has a
302 "Moved Temporarily" in it (with a redirection URL). Try it
with "curl -v ...." and you'll see
HTTP/1.1 302 Moved Temporarily
Location: https://efile.boe.ca.gov/boewebservices/
verification_results.jsp
in the output.
To get curl to follow these redirects, use a -L. You might try
curl -L "https://efile.boe.ca.gov/boewebservices/servlet/
BOEVerification" --output "/temp.htm" -d
"account=12121212&type=SALES&button=Submit"
No idea whether the output makes sense but at least this way you
get something in /temp.htm .
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40red-sweater.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden