- file_get_contents: documentation ( source)
- json_decode: documentation ( source)
- number_format: documentation ( source)
<?php
$fb_username = 'ShuroSan';
$fb = @json_decode(file_get_contents('https://graph.facebook.com/'.$fb_username));
$fb_fans = number_format($fb->fan_count);
?><html>
<head>
<title>Fans and Followers</title>
</head>
<body>
Facebook fan count: <?=$fb_fans;?><br />
</body>
</html>