changed sensor.php to api.php