curl-and-php
Command line works....can't get libcurl or exec (curl) to post to https
Date: Tue, 3 Aug 2004 10:06:46 -0400
CURL Information: libcurl/7.10.3 OpenSSL/0.9.6g ipv6 zlib/1.2.1 on Linux
I'm trying to access a third party system for insurance quotes(ASP w/
session cookies) using PHP and curl.
Here is my command line...that works perfectly
curl -b cookies.txt -c cookies.txt -d
"page=quoteinfo&XML_ILLUSTRATEYEARS=0&XML_MM=10&XML_DD=05&XML_YYYY=1977&
XML_MMDDYYY=&NAV_overview=View+Quote+Here&XML_SEX=1&XML_COMMONHEALTH=1&X
ML_STATE=TX&XML_FACE_AMOUNT=900000&XML_TERM=30&FRM_fname=Art&FRM_lname=W
illiams&FRM_email=art_at_artandbeth.com&FRM_phone=%28210%29+326-9838"
https://www.myagency.net/iQuote/iQuote.asp?sid=11337&tid=1
Here is what doesn't work...
$st = exec("curl -b cookies.txt -c cookies.txt -d $clientstring
https://www.myagency.net/iQuote/iQuote.asp?sid=11337&tid=1");
echo $st;
This also doesn't work...
$ch =
curl_init("https://www.myagency.net/iQuote/iQuote.asp?sid=11337&tid=1");
curl_setopt ($ch, CURLOPT_COOKIEJAR, "cookie.txt");
curl_setopt ($ch, CURLOPT_COOKIEFILE, "cookie.txt");
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFILEDS, $clientstring);
curl_exec($ch);
curl_close($ch);
Can anyone see anything I'm doing wrong. This is my first time using
CURL.
Thanks.
Art
Received on 2004-08-03