PHP code for online voting system ticket Flushing

Source: Internet
Author: User
PHP code for online voting system ticket Flushing

Voting on many websites is based on IP addresses. different IP addresses can be voted once a day.

The following code uses curl extension to forge an IP address to achieve unrestricted voting;

  1. $ Times = $ _ POST ['Times ']; // number of votes
  2. $ Url = $ _ POST ['URL']; // voting address [link to the voting button below a contestant]
  3. While ($ times)
  4. {
  5. $ Ip1 = 'x-FORWARDED-:'. 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;

Voting system, PHP

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.