Powered by Blogger.

Configuring cURL in XAMPP (Win XP)

meng-enable curl dalam xampp...

susah-susah gampang... memang.... pada dasarnya adalah dengan menggunakan serangkaian proses dengan merubah php.ini
dan uncomment

Configuring cURL with PHP and Apache on windows is a tedious process . I used to spend hours on system to configure it and finally got the procedure to do it . I am sharing with you step by step details of configuring it .

1. Install PHP to a location comfortable for you .

2. Edit php.ini file within the php folder

    * set extension_dir = “C:\xampp\php\ext”
    * set register_globals = On
    * set session.save_path = “C:\xampp\tmp” – create it if that folder doesn’t exist

3. Copy php4ts.dll ( if you are using php 5 or above then file would be php5ts.dll ) located inside php folder to apache bin folder .

4. Copy libeay32.dll and ssleay32.dll (located in C:\xampp\php\dlls\) to c:\windows\system32

5. Download cURL from here . Unzip cURL to D:\apps\curl .

6. [SSL INSTALL ONLY] Download OpenSSL for Windows from here and extract libssl32.dll to D:\apps\curl .

7. [Windows XP Install Only] Check to see if you have the following file: C:\windows\system32\msvcr70.dll. If not, search for it in Google and download it to system32. You may get error messages without it.

8. Uncomment the curl line in your php.ini file to enable curl: extension=php_curl.dll

Test with the following PHP code :

$url = "http://www.terserahanda.com";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$returned = curl_exec($ch);
curl_close ($ch);
echo $returned;

3 comments

oi... nice articles....

Balas

salam mas.... nice blog

Balas

Bannerad

Artikel Terpopuler

Tags

Blogumulus by Roy Tanck and Amanda Fazani