Updated demo api.php