added API example for PHP