Comprehensive Image counters ---------------------------------------------------------------------------------- please keep the integrity of the article complete --------------------------------------------------------------------------------------? Counter. phpAllrightsreservedspor counter
Comprehensive Image counters
--------------------------------------------------------------------------------
Please maintain the integrity of the article
Bytes --------------------------------------------------------------------------------------
// Counter. php All rights reserved http://sports98.126.com
// You can apply for a counter similar to 163 to activate the multi-user service. the [image counter] v1.00 code is free of charge. if you use this code, please ensure that your code is fully published.
$ Counterfile = "./counter country name1_.txt"; // define the data file;
$ Fp = fopen ("$ counterfile", "rw"); // open a data file
$ Usernumber = fgets ($ fp, 8); // retrieve the data file
$ Usernumber + = 1; // calculate data
$ Int_counter = $ usernumber; // separate an operation variable.
$ Int_pan = 10000000; // defines the divisor
For ($ int_b1 = 0; $ int_b1 <= 7; $ int_b1 ++) // this cycle changes the data to the image location for the judgment data
{
$ Int_a [$ int_b1] = $ usernumber/$ int_pan;
$ Int_a [$ int_b1] = intval ($ int_a [$ int_b1]);
$ Int_a_a [$ int_b1] = selectpic ($ int_a [$ int_b1], $ xxxx);/* Note that the function can be omitted for multiple users, use data encryption */
$ Usernumber = $ usernumber % $ int_pan;
$ Int_pan = $ int_pan/10;
}
Echo"
"; // Output data Image framework
For ($ int_la = 0; $ int_la <= 7; $ int_la ++)
{
Echo "$ int_a_a [$ int_la]"; // output data Image
}
Echo"
";
Exec ("del $ counterfile"); // delete a data file to prevent appending
// Use exec ("rm-vf $ counterfile") in unix ");
Exec ("echo $ int_counter> $ counterfile"); // add the latest data to the file.
Function selectpic ($ int_tmp, $ path) // determines the image position function
{
$ Int_pic = "";
Return ($ int_pic );
}
?>
Bytes ------------------------------------------------------------------------------------
// Jsq. php
// When applying, it is best to use the database to save the application list so that hackers can be found later. here, I did not consider user verification.
// You can directly generate this file.
If ($ submit ){
$ Db = mysql_connect ("host", "name", "password") or die ("connect faild! ");
Mysql_select_db ("table", $ db );
$ Query = "insert into table value (',')";
$ Result = mysql_query ($ query, $ db );
Exec ("echo 0>./counter/Ter {username=.txt ");
Print "Congratulations! You have successfully applied for the service ";
Print "use the following code