php file_get_contents直接工作但不通过ajax和我的网址

I have the following code to get the facebook comments for my sites url:

<?php
$url="http://developers.facebook.com/blog/post/472";
$request_url ="https://graph.facebook.com/comments/?ids=".$url;
$requests = file_get_contents($request_url);
print_r($requests);
?>

The above works fine using the sample url that facebook provide in their tutorial. I can load the page above directly or through ajax and all is good.

The problem only arises for my url and specifically when loading it using ajax. If I load the page directly it works fine, but why when I try and load it through ajax do I get:

function.file-get-contents: failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error

As a security precaution, most production PHP servers should have

allow_url_fopen = Off

set to off. This would cause your script to fail like you're seeing it.

Instead, use CURL. See http://snipplr.com/view/4084/