Test Freebase access using PHP
$url
\n";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_VERBOSE, 1); # dump info to server logs
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_COOKIE, $credentials);
$response_text = curl_exec($curl);
curl_close ($curl);
if (preg_match('/200 OK/',$response_text)) {
$color='green'; $message='Query succeeded';
} else {
$color='red'; $message='Query failed';
}
echo "$message
\n";
echo "Response:
$response_text
\n";
?>