[ADD] Basic api call handling
[ENHANCEMENT] Closing tags on php

In order t okeep it consistent.