Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function GrabProxy() {
- $curl = curl_init();
- $data = array(
- CURLOPT_URL => "https://www.sslproxies.org", CURLOPT_REFERER => "https://google.com/",
- CURLOPT_SSL_VERIFYPEER => false, CURLOPT_RETURNTRANSFER => FALSE,
- CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36",
- CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_FOLLOWLOCATION => TRUE
- );
- curl_setopt_array($curl,$data);
- $response = curl_exec($curl);
- curl_close($curl);
- preg_match_all('@<td>(.*?)</td>@si',$response,$return);
- for($i=0; $i < 400; $i+=4) {$proxy[] = $return[1][$i];}
- for ($i=1; $i < 400; $i+=4) {$port[] = $return[1][$i];}
- $merge = array_merge($proxy,$port);
- for ($i=100; $i < 200; $i++) {$proxz[] = $i;}
- for ($i=0; $i < 99 ; $i++){$random[] = $merge[$i].":".$merge[$proxz[$i]];}
- return $random[rand(0,98)];
- }
- function Test() {
- $proxy = explode(':', GrabProxy());
- $curl = curl_init();
- $data = array(
- CURLOPT_URL => "https://www.myip.com/", CURLOPT_REFERER => "https://google.com/",
- CURLOPT_SSL_VERIFYPEER => false, CURLOPT_RETURNTRANSFER => FALSE,
- CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36",
- CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_FOLLOWLOCATION => TRUE, CURLOPT_PROXY => $proxy[0], CURLOPT_PROXYPORT => $proxy[1]
- );
- curl_setopt_array($curl,$data);
- $response = curl_exec($curl);
- curl_close($curl);
- return print($response);
- }
- Test();
Add Comment
Please, Sign In to add comment