First, make sure you have libcurl
(see: http://curl.haxx.se) installed. Then make sure your copy of PHP has been compiled with the --with-curl[=DIR]
flag. For more info see:
If XAMPP comes pre-compiled with cURL you may just need to enable the extension in your php.ini file (usually by removing a semicolon at the start of the line which includes the extension).
1) C:\Program Files\xampp\php\php.ini
2) Uncomment the following line on your php.ini file by removing the semicolon.
;extension=php_curl.dll
3) Restart your apache server.
You can add any extension (in Wamp and Xampp servers) by removing the semi-colon (;)
For XAMPP on MACOS or Linux, remove the semicolon in php.ini file after extension=curl.so
In XAMPP installation directory, open %XAMPP_HOME%/php/php.ini
file. Uncomment the following line:
extension=php_curl.dll
PS: If that doesn't work then check whether %XAMPP_HOME%/php/ext/php_curl.dll
file exist or not.
It should be available in php.ini file. You need to un-comment the line for curl extension:
;extension=php_curl.dll
^----- remove semi-colon
Source: Stackoverflow.com