freebase cURL and mqlwrite with PHP
It ended up being an issue with the way I was sending data to freebase. Once I added
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
it all worked fine.
It was weird as I could only get it working when I sent the data as a post variable and also added content to the query string of the request.