I am using a great rating system. I php include it in a file, and it automatically creates a filename.dat to record the votes.
the code:
$ficdest=explode(".",basename($PHP_SELF));
$ficdest=$ficdest[0].".dat";
if(file_exists($ficdest)) {
$compteur=fopen($ficdest, "r");
$old_stats=file($ficdest);
$stats=explode("|", $old_stats[0]);
fclose($compteur);
$new_count=$stats[0];
if ($stats[3] != $REMOTE_ADDR) {
$new_count +=1;
}
the problem:
if the page is not terminated by .php, .html or .shtml it will ignore it and does not create the file, or simply create all the files for the different pages as rate.dat, all with the same name.
the question:
How can I alter the above code to interpret pages such as
http://site.com/stay.php?action=show&ID=1
If the page terminates as stay.php, all is fine. But what I need is to be able to catch the entire string.
I tried virtually all I know.
Thanks for any suggestions