Adjusted API for PHP script