I want a counter to track number of clicks on various song links on my html page and that number to be visible at a location on that page.
I made a counter.php script:
<?php
$count = file_get_contents("count.txt");
$count = explode("=", $count);
$count[1] = $count[1]+1;
$file = fopen("count.txt", "w+");
fwrite($file, "count=".$count[1]);
fclose($file);
print "count=".$count[1];
?>
I also have a count.txt file with a value of 0. So far I have the essential tools. My delima is:
How to make the links trigger a count each time they are clicked in addition to playing the song that was click on. Instead of
<a href="http://www.aconeinc.com/sounds/hollademo.m3u">Hi-fi for instance, what should it be?How to make that value in the count.txt to be visible on my html page. How do I insert it on a given location on my page?
Thank you
Ken