Keep the integrity of the article & nbsp; --------------------------------------------------------- keep ;-------------------------------------------------------------------------------------------------------------------------------
Please maintain the integrity of the article
Bytes --------------------------------------------------------------------------------------
// Counter. php (as the mainstream development language) 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 (as the mainstream development language)
// 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 (the best combination with PHP) _ connect ("host", "name", "password") or die ("connect faild! ");
MySQL (best combination with PHP) _ select_db ("table", $ db );
$ Query = "insert into table value (,)";
$ Result = MySQL (the best combination with PHP) _ query ($ query, $ db );
Exec ("echo 0>./counter/Ter {username=.txt ");
Print "Congratulations! You have successfully applied for the service ";
Print "use the following code
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.