ajax to php to curl and back
The PHP manual states that the first parameter of curl_error is a handle returned by curl_init();. Try replacing what you pasted with what is given below. This adds the $ch variable as a parameter to all the instances of curl_error();.
$ch = curl_init() or die(curl_error($ch)); curl_setopt($ch, CURLOPT_URL, $feed); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data1 = curl_exec($ch) or die(curl_error($ch)); echo $data1;