<?php
// Get current page Likes
if (ini_get('allow_url_fopen') != 1) die("ERROR");

$pagelikes = json_decode(file_get_contents("http://graph.facebook.com/".$_GET['id']."/"));

if($pagelikes->likes < $_GET['starts']) {
	echo ($_GET['starts'] - $pagelikes->likes);	
	die;
}

if($pagelikes->likes < $_GET['ends']) {
	echo ($_GET['ends'] - $pagelikes->likes);	
	die;
}
?>