Re: curl_init() ??

From: Date: Thu, 12 Sep 2002 10:26:10 +0000
Subject: Re: curl_init() ??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-116117@lists.php.net to get a copy of this message
Hello, 1)probably you don't have CURL extension enabled in your php.ini file? try to open php.ini and search for CURL. 2)to achieve a POST via PHP code, look at www.phpclasses.org Elias, "Geoff Lists" <geofflists@bigtree.com.au> wrote in message news:42D868DE-C62E-11D6-8FE6-003065411570@bigtree.com.au... > 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 > -- > Geoff Hill > Information Technology Training & Solutions > A.B.N. 28 712 665 728 >

« previous php.general (#116117) next »