LoRz

Monday, June 16, 2008

 

Enabling cURL in XAMPP


Search for all the PHP ini files in the XAMMP directory including php4.ini/php5.ini


Look for the lines

;extension=php_curl.dll
;extension=php_openssl.dll

Uncomment the lines to enable the extension

extension=php_curl.dll
extension=php_openssl.dll

Restart Apache. To verify, you should see in the PHP info [phpinfo();] that cURL is enabled or you could try testing the following code


<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "http://www.google.com/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$output = curl_exec($ch);

curl_close($ch);

$output = str_replace('Google', 'Test', $output);

echo $output;

?>






<< Home

Archives

June 2008   July 2008   August 2008   September 2008   October 2008   November 2008   December 2008   January 2009   February 2009   March 2009   May 2009   July 2009   September 2009   October 2009   WEC 44 live stream   UFC 106 live stream

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]