This was my first example to query some template data from the TemplateMonster API system. The script will try to access the API system for every pageview and return a small data set of web templates. The script is using the WEBAPI version which is very limited. For your own template shop it's much better to build a template database together with the XML API system. My second template API script works exactly that way: Synschronize the new and updated template data ones a day with the data in your own MySQL database. This way your website always online, even if the TemplateMonster API is offline or doesn't provide the required data very fast. If you click on the template images, a new window/tab will open which brings you to the template detail page on www.templatemonster.com.
I used for this demonstration some PHP Memcached functions to create a cache for the template data. If you this simple code snippet, you should do the same because there is no API provider that allows you to query their servers for every pageview.