View Single Post
Old 03-17-2009, 08:30 PM   #1 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default Cannot use CURL?

Hi,

I do have curl installed and I just can't get it to work. Here's my curl setup.


curl -V

curl 7.12.1 (i386-redhat-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6
Protocols: ftp gopher telnet dict ldap http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz


Code:
<?php

	define("CURL_PATH", "/usr/bin/curl");
	
 $ch = curl_init('index.html');
 curl_setopt ($ch, CURLOPT_POST, 1);
 curl_setopt ($ch, CURLOPT_POSTFIELDS, "email_address=email&password=password");
 curl_exec ($ch);
 curl_close ($ch);
?>
I keep getting this error...

Fatal error: Call to undefined function: curl_init() in /usr/local/apache/test.html on line 5

Line 5 is this:

$ch = curl_init('index.html');

I tried both relative and absolute paths for the URL and it still doesn't work...
allworknoplay is offline  
Reply With Quote