I want to show the Visits for the current day on a homepage. That page is tracked with Piwik.
How to use the API with PHP to get the (unique) visits and hits for today so that I can show them somewhere on the page
$result = file_get_contents("http://mysite.com/piwik/?module=API&method=VisitsSummary.getUniqueVisitors&idSite=1&period=day&date=today&format=php");
echo unserialize($result);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With