Bret Thomas
Bret Thomas

Reputation: 337

cURL returns different

Simple script but does not seem to be posting the fields across correctly on the second server. The only difference in php info is NSS/3.12.7.0 and NSS/3.12.9.0. One is on https and the other is not, is there another option that I am missing here?

    $ch=curl_init();
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, TRUE);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
    $result=curl_exec($ch);
    curl_close($ch);

Upvotes: 0

Views: 165

Answers (1)

Gershon Herczeg
Gershon Herczeg

Reputation: 3054

Add this it will turn off SSL verification :

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

Upvotes: 1

Related Questions