Ok so this is a short one, but in the past if you were running Apache/PHP/MySQL on your windows computer there were a lot of steps to get CURL working with PHP in Windows. Many developers, myself included, like to set up a web server on the desktop when doing development, and a project I’m working on I decided to add in Curl. I use XAMPP currently, so I wasn’t sure if I should go through all the trouble of installing curl and configuring things if I didn’t have to. And as it turns out, it’s as simple as uncommenting it in your php.ini file.
Step 1: Find your php.ini file
Find your php.ini file. You can do this by looking at your phpinfo page:
If you don’t have one setup, you simply create a php file with the following code:
And bring it up in your web browser.
Step 2: Uncomment “extension=php_curl.dll”
Search the php file for the following:
And remove the “;” to enable it.
And you’re done! I love XAMPP for it’s simplicity. You get an easy install of Apache, PHP and MySQL but you can still go in and configure things as you want. It’s a great product!