PHP code for brushing votes in online voting system

WBOY
Release: 2016-07-25 08:46:12
Original
1619 people have browsed it

Voting on many websites is based on IP address. Different IP addresses can vote once a day

The following code uses curl extension to forge IP addresses to achieve unlimited voting;

  1. $times = $_POST['times']; //Number of votes
  2. $url = $_POST['url']; / /Voting address [link to the voting button below a player]
  3. while ($times)
  4. {
  5. $ip1 = 'X-FORWARDED-FOR:'.rand(115,225).'.'.rand(115,225).'. '.rand(115,225).'.'.rand(115,225);
  6. $ip2 = 'CLIENT-IP:'.rand(115,225).'.'.rand(115,225).'.'.rand(115,225). '.'.rand(115,225);
  7. $arr = array('a','b','c','d','e','f','g','h','i' ,'j','k','l','m','n','o','p','q','r','s','t','u',' v','w','x','y','z');
  8. $from = "http://www.".$arr[rand(0,25)].".com/";
  9. $ch = curl_init();
  10. curl_setopt($ch, CURLOPT_URL, $url);
  11. curl_setopt($ch, CURLOPT_HTTPHEADER, array($ip1, $ip2));
  12. curl_setopt($ch, CURLOPT_REFERER, $from);
  13. curl_setopt($ch, CURLOPT_HEADER, 1);
  14. curl_exec($ch);
  15. curl_close($ch);
  16. $times--;
  17. }
  18. return ;
Copy code

Voting system, PHP


source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!