cURL / Mailing Lists / curl-users / Single Mail

curl-users

Using curl with bank of america

From: Matt Juszczak <matt_at_atopia.net>
Date: Thu, 25 Jan 2007 10:47:52 -0500 (EST)

Hi all,

I am having trouble using curl with bank of america. In PHP, I am doing:

         $URL="https://sitekey.bankofamerica.com/sas/signonScreen.do?state=NJ";
         $ch = curl_init();
         curl_setopt($ch, CURLOPT_URL,"$URL");
         curl_setopt($ch, CURLOPT_POST, 0);
         curl_setopt($ch, CURLOPT_AUTOREFERER, 0);
         curl_setopt($ch, CURLOPT_VERBOSE, 1);
         curl_setopt($ch, CURLOPT_HEADER, 1);
         curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/cookiejar");
         curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/cookiejar");
         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
         $value = curl_exec ($ch);
         curl_close ($ch);

And it is failing with a site error. Yet when I visit that website in
firefox, without cookies on, etc. it works just fine.

Anyone have any ideas?

Thanks!

-Matt
Received on 2007-01-25