If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > How to test if PHP curl is working ok on windows

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-16-09, 08:31
oliflorence oliflorence is offline
Registered User
 
Join Date: Aug 2004
Posts: 96
How to test if PHP curl is working ok on windows

Hi,
i am not a PHP developper and have got a PHP script done for me using PHP curl.

The script worked perfect until the site moved server and now it just returns a blank page. The PHP developper is letting me know that i should check to see if the PHP curl extension is installed on server, the server's tech support is telling me it is but obviously something is missing somewhere on that server.

Would any one please take a quick look at the script below and let know if any other extension is required and is there an easy test to see if the famoud PHP curl extension is indeed installed on the server.

here is the script (the part relating to the curl, the variables used in the script are ok):

Code:
$options = array(
    CURLOPT_RETURNTRANSFER  => true,
    CURLOPT_POST            => true,
    CURLOPT_POSTFIELDS      => 'orderno=' . $orderno . '&billtocountry=' . $billtocountry,
    CURLOPT_HTTPAUTH        => CURLAUTH_BASIC,
    CURLOPT_USERPWD         => "$siteid:$sitekey",
    CURLOPT_SSL_VERIFYPEER  => false
  );

  $ch = curl_init($url);
  curl_setopt_array($ch, $options); // set the options
  $output = curl_exec( $ch );
  $info   = curl_getinfo( $ch );
  $errno  = curl_errno($ch);
  $error  = curl_error($ch);
  curl_close($ch);
The page retunred is totally blank.

many thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On