It looks like you have some mistakes in your PHP configuration file.
To fix your errors you must edit your php.ini file.
For displaying errors in development mode, change the error_reporting value to E_ALL.
error_reporting=E_ALL Then you have to enable the cURL extension. To enable it in your php.ini, yous have to uncomment the following line:
extension=php_curl.dll Once you edited this values, don't forget to restart your webserver (Apache or Nginx)
Also I agree with my colleagues, you should url_encode your JSON string.
From my point of view the code should be:
<?php ini_set('display_errors', '1'); error_reporting(E_ALL); $apiKey = '*apikey*'; $filters = '{"category":"Automotive","$loc":{"$within":{"$center":[[41,-74],80467.2]}},"website":{"$blank":false}}'; $params = '?api_key=' . $apiKey . '&filters=' . url_encode($filters); $url = 'http://api.factual.com/v2/tables/bi0eJZ/read'; $url .= $params; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 30); $output = curl_exec($ch) or die("cURL Error" . curl_error($ch)); curl_close($ch); echo "out: " . $output; EDIT:
Another approach could be to use the Official PHP driver for the Factual API: Official PHP driver for the Factual API
It provides a Debug Mode with a cURL Debug Output and a Exception Debug Output.