I have a php script in which i'm making curls which works on one server, but not another.
When attempting to use it I get errors such as the following
Notice: Use of undefined constant CURLOPT_POST - assumed 'CURLOPT_POST'
Notice: Use of undefined constant CURLOPT_POSTFIELDS - assumed 'CURLOPT_POSTFIELDS'
In the script I have
$options = array(
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $data,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_AUTOREFERER => true,
CURLOPT_CONNECTTIMEOUT => 120,
CURLOPT_TIMEOUT => 120,
);
$ch = curl_init( $url );
curl_setopt_array( $ch, $options );
$content = curl_exec( $ch );
I don't know much about curling so I'm assuming its something to do with maybe the versions of php on the different servers?
If anyone could point me in the right direction it would be much appreciated!