If you are having the error Call to undefined function curl_init() in Windows, then you have to simply modify a line in apache’s php.ini file.
Goto your xaampfolder,
find out php.ini in bin folder
and open it in a text editor.
Find the text
extension=php_curl.dll
and remove the semi-colon at the start.
Now that line would look like:
extension=php_curl.dll
(without semi-colon on start)
Save the file, and restart your Apache Server. And the problem is solved.