Curl calls in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Croydon
Forum Newbie
Posts: 1
Joined: Fri Jan 15, 2010 4:31 am

Curl calls in php

Post by Croydon »

we wrote some php code and there are some curl calls in there as shown below.

Code: Select all

 
function submitString($string2) {
  $c   = curl_init($string2);
  curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
  $xml = curl_exec($c);
   curl_close($c);
  return($xml);
}
 
However, the calls failed as there is nothing returned on production server.

The code works on our development server. I have also check the production server have curl enabled.

The servers are all linux centos 5.0

Any ideas?

Thanks
Sadam
Forum Newbie
Posts: 5
Joined: Fri Jan 15, 2010 9:21 am

Re: Curl calls in php

Post by Sadam »

Has PHP definitely been compiled with cURL on the production server?

Try:

Code: Select all

<?php
 
print_r(curl_version());
 
?>
Post Reply