Many websites vote based on IP addresses, different IP addresses can be voted once a day The following code is the use of Curl extension to forge an IP address to achieve unrestricted voting;
- $times = $_post[' Times ']; Number of votes
- $url = $_post[' url ']; Voting address [link to voting button under a contestant]
- while ($times)
- {
- $ip 1 = ' x-forwarded-for: '. Rand (115,225). '. '. Rand (115,225). '. '. Rand (115,225). '. '. Rand (115,225);
- $ip 2 = ' 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 ($ip 1, $ip 2));
- curl_setopt ($ch, Curlopt_referer, $from);
- curl_setopt ($ch, Curlopt_header, 1);
- Curl_exec ($ch);
- Curl_close ($ch);
- $times--;
- }
- return;
Copy Code |