API Scripts in PHP