Using phpinfo() I have half way down my list of features:
CURL support enabled
CURL Information libcurl 7.9 (OpenSSL 0.9.6b)
I run the script:
$ch=curl_init('https://www.anysite.asp');
;and go on set curl opts
$submit="some data";
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$submit);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$data=curl_exec($ch);
if (!data){
die(sprintf('Error [%d]: %s',curl_errno($ch),curl_error($ch)));
}
;and receive a fatal error in Zend development Environment of
Call to undefined function: curl_init() in <b>C:\Apache Group\Apache2\htdocs\myfile.php
In a browser this reads:
Notice: Use of undefined constant data - assumed 'data' in C:\Apache Group\Apache2\htdocs\myfile.php on line 28
It does actually perform the transfer, and I receive a stream of data back.
Am I being stupid (this is my first attempt at php) or is the curl entension not correctly installed. (or perhaps both)?