using the API in PHP Page