Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Need help with php curl

taufikhdyttaufikhdyt Posts: 1Member
I need help to get flight schedule from but always error using curl to access ssl.

here are my code:

$headers = array(
"User-Agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 GTB7.1 (.NET CLR 3.5.30729)",
"Cookie=language=in; location=id; dest=home; __utma=260465999.1394002812.1293106375.1293106375.1293106375.1; __utmb=260465999.1.10.1293106375; __utmc=260465999; __utmz=260465999.1293106375.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)",

// do access to sriwijaya air
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_COOKIEJAR, "cookie.txt");

//curl_setopt($curl, CURLOPT_POSTFIELDS, "isReturn=false&from=CGK&to=MES&departDate1=22&departDate2=01-2011&adult=1&child=0&infant=0&returndaterange=0&Submit=Cari");
$curlData = curl_exec($curl);



any help will be appreciate, thanks
Sign In or Register to comment.