Comprehensive Picture Counter _php Foundation

Source: Internet
Author: User
--------------------------------------------------------------------------------
Please keep the integrity of the article
--------------------------------------------------------------------------------------
?
counter.php All rights reserved http://sports98.126.com
Similar to 163 of the counter, you can apply for, open Multi-User services, [picture counter]v1.00 code for free, if you use this code to ensure that your code should be fully published

$counterfile = "./counter/${name}.txt"; define data files;
$FP =fopen ("$counterfile", "RW"); Open Data File
$usernumber =fgets ($FP, 8); Fetching data File Data
$usernumber +=1; Calculate the data
$int _counter= $usernumber; To separate an action variable
$int _pan=10000000; Define Dividend
For ($int _b1=0 $int _b1<=7; $int _b1++)//This loop changes the data to the image position for the decision 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 If this is a single user can omit the use of functions, the use of functions for multi-user use, encryption of data use * *
$usernumber = $usernumber% $int _pan;
$int _pan= $int _PAN/10;
}
echo "<div style=" Border:dotted;width:xxx;border-color:${rgb};height:xxx;cursor:hand; > "; Image frame of output data
for ($int _la=0; $int _la<=7; $int _la++)
{
echo "$int _a_a[$int _la]"; Output data image
}
echo "</div>";
EXEC ("del $counterfile"); Delete data file to prevent append
Under UNIX use EXEC ("RM-VF $counterfile");
EXEC ("echo $int _counter > $counterfile"); Add the latest data to the file
function Selectpic ($int _tmp, $path)//decision picture position functions
{
$int _pic= " ';
Return ($int _pic);
}
?>
------------------------------------------------------------------------------------
?
jsq.php
When applying, it is best to use the database to save the application list so that you can find the person who embezzled it later, where I don't consider user authentication.
You can generate this file directly.
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/${username}.txt");
Print "Print please use the following code <script language=javascript src= "Http://host/cccc.php?name=xxxx&xxxx=1&rgb=color" > </script> ";
?>
-----------------------------------------------------------------------------------
cccc.php
document.write ("A;?") Include "./counter.php"?> ");

Note This counter combined with MySQL after adding authentication can be applied to the service.
Commissioning passed through in the Oso, passed in 51 smoothly through the 2000+iis5.0+php4.0.5

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.