-1

是否有一个快速简单的 html 或 php 脚本可以粘贴在这里,我网站中的每个 IP 地址每 10 秒获得 1 分?

4

1 回答 1

0

在经常调用的ajax请求中

$current = time();
if (isset($_COOKIE["time_last"]))
if ($current - $_COOKIE["time_last"] > 10)  // time to points
if ($current - $_COOKIE["time_last"] < 300) //No away
{
$points = @file_get_contents(__DIR__."/points.txt"); //current point
file_put_contents(__DIR__."/points.txt",$points+1); // save new
}

setcookie("time_last",time()); // Add time stamp to browser
print "Points: ".file_get_contents(__DIR__."/points.txt");
于 2019-02-19T07:43:51.987 回答