Table of Contents
恭喜!您已经成功的申请到服务了
Home php教程 php手册 综合图片计数器_php基础

综合图片计数器_php基础

May 17, 2016 am 09:10 AM

--------------------------------------------------------------------------------  
请保持文章的完整性  
--------------------------------------------------------------------------------------  
  
//counter.php All rights reserved http://sports98.126.com  
//类似163的计数器,可以申请使用,开通多用户服务,[图片计数器]v1.00 代码免费,如果您使用本代码请保证您的代码也要完全公布  

$counterfile="./counter/${name}.txt"; //定义数据文件;  
$fp=fopen("$counterfile","rw"); //打开数据文件  
$usernumber=fgets($fp,8); //取出数据文件数据  
$usernumber+=1; //将数据计算  
$int_counter=$usernumber; //分出一个操作变量  
$int_pan=10000000; //定义被除数  
for($int_b1=0;$int_b1{  
$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); /* 注意这里如果是单用户可以省略使用函数,使用函数是为了多用户使用,将数据加密使用 */  
$usernumber=$usernumber % $int_pan;  
$int_pan=$int_pan /10;  
}  
echo "

"; //输出数据图象框架  
for($int_la=0;$int_la{  
echo "$int_a_a[$int_la]"; //输出数据图象  
}  
echo "
";  
exec("del $counterfile"); //删除数据文件防止追加  
//unix 下使用 exec("rm -vf $counterfile");  
exec("echo $int_counter > $counterfile"); //添加最新数据到文件内  
function selectpic($int_tmp,$path) //判定图片位置函数  
{  
$int_pic="综合图片计数器_php基础";  
return($int_pic);  
}  
?>  
------------------------------------------------------------------------------------  
  
//jsq.php  
//申请的时候,最好使用数据库将申请名单保存,以便以后发现盗用者,在这里我没考虑用户验证  
//可以直接生成这个文件就可以了  
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 "请使用以下代码";  
?>  
-----------------------------------------------------------------------------------  
//cccc.php  
document.write(" include "./counter.php" ?>");  

//注意本计数器 结合mysql后添加验证就可以进行申请服务了。  
//调试在oso通过,在51顺利通过,在2000+iis5.0+php4.0.5顺利通过 
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)