<html>
<head>
&lt!-- see https://www.opentracker.net/examples/php_api_example.php for php enabled version --?&gt;
</head>
<body>
<pre>
&lt;?php
$admin =        &quot;login=demo@opentracker.net&quot;;
$pwd =          &quot;password=demo123&quot;;
$site =         &quot;site=www.opentracker.net&quot;;
$period =       &quot;period=4w&quot;;

// get the data from the api
$json = file_get_contents(&quot;http://api.opentracker.net/api/trends/trends_summary.jsp?$admin&amp;$pwd&amp;$site&amp;$period&quot;);

// transform to object
$obj = json_decode($json, true);


?&gt;

&lt;html&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;?php echo $obj[&quot;resultsList&quot;][1][&quot;selected period&quot;]; ?&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
</body>
</html>
