In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hi, > I am using PHP v.4.1.2, CURL v7.7.2 with Apache server on MacOS X > 10.1.5 > I have a PHP script containing the following: > $ch = curl_init(); > curl_setopt($ch, CURLOPT_URL,"http://omitted.com"); > curl_setopt($ch, CURLOPT_FAILONERROR, 1); > curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); > curl_setopt($ch, CURLOPT_POST, 1); > curl_setopt($ch, CURLOPT_POSTFIELDS, "salexml=$saleXML"); > $result=curl_exec ($ch); > curl_close ($ch); > > When I run the script I receive the following error: > Fatal error: Call to undefined function: curl_init() > > My reading of the PHP manual, Curl man pages, curl web site and PHP > books and articles in the curl-php mailing list indicate that this > should work. > > Can someone tell me how to get PHP to recognise the function > "curl_init()" or tell me another method of getting a PHP script to > simulate POST method as though the data was being sent from a form. > > TIA
It seems that the version of PHP you are using doesn't have curl support compiled in/ doesn't have curl libs loaded through the ini file. Run a script with <?php phpinfo() ?> to confirm you don't have curl support; you may have to recompile or if you have the appropriate curl exstension lib you can probably add/uncomment curl in the etensions section of yor php.ini > -- > Geoff Hill > Information Technology Training & Solutions > A.B.N. 28 712 665 728 So I don't need to withold tax on this reply:-) Cheers -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php