Update api.php

Fix for issue #2 and PHP opening tag changed to full tag.