Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkProxy($proxy) {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "http://www.cpanel.net/showip.cgi");
- curl_setopt($ch, CURLOPT_TIMEOUT, 30);
- curl_setopt($ch, CURLOPT_PROXY, $proxy);
- curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
- $result = curl_exec($ch);
- echo $result;
- if (stristr($result,"Moved Permanently") !== false){
- return 0;
- echo 'Proxy Die';
- } else {
- return 1;
- echo 'Proxy Live';
- $proxy = "$json->ip:$json->port";
- }
- curl_close($ch);}
- $ch = curl_init();
- $proxy = getProxy();
- while (!checkProxy($proxy)) {
- $proxy = getProxy();
- }
Add Comment
Please, Sign In to add comment