This article will be on your own mirror station can also put on their own counters.
I assume that you have multiple mirror stations as an example, first insert a few new data in the data table num, visited, which will be used on your mirror station, as long as the count1.php in the previous article to change it.
First set up a folder count, put the file you want to use count2.php,count3.php ..., for example, such as Count2 source code, the count1.php changed to:
$linkptr =mysql_pconnect ("localhost", "yourname", "password");
mysql_select_db ("Yourname", $linkptr);
mysql_query ("Update counter
Set visited=visited+1 where num=2 ", $linkptr);
$result =mysql_query ("Select visited
From counter where num=2 ", $linkptr);
List ($counter) =mysql_fetch_row ($result);
$counter =sprintf ("%05d", $counter);
for ($i =0; $i <5; $i + +) {
$tmpstr = "";
Echo $tmpstr;
}
?>
Note: "To finish this step, we'll set up a folder show, which puts the corresponding file show2.php,
show3.php., take show2.php as an example, the source code is written as:
document.write (" ");
Attention: Don't forget to count the two points, this is the complete path!
Finally, place the code in the appropriate location on your mirror station:
Http://cnfree.oso.com.cn is my space on the Oso, you can replace it with your own!
All right, all ok!. See if your Mirror Station home page counter is also displayed? The next article I just introduce to your site members to provide free counters some ideas, basically is the content of some of the expansion.
http://www.bkjia.com/PHPjc/315574.html www.bkjia.com true http://www.bkjia.com/PHPjc/315574.html techarticle This article will be on your own mirror station can also put on their own counters. I assume that you have multiple mirror stations as an example, first insert several new data into the data table num, visited, which in your ...