Guest User

Untitled

a guest
Mar 20th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. function checkProxy($proxy) {
  2. $ch = curl_init();
  3. curl_setopt($ch, CURLOPT_URL, "http://www.cpanel.net/showip.cgi");
  4. curl_setopt($ch, CURLOPT_TIMEOUT, 30);
  5. curl_setopt($ch, CURLOPT_PROXY, $proxy);
  6. curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
  7. curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  8. $result = curl_exec($ch);
  9. echo $result;
  10. if (stristr($result,"Moved Permanently") !== false){
  11. return 0;
  12. echo 'Proxy Die';
  13. } else {
  14. return 1;
  15. echo 'Proxy Live';
  16. $proxy = "$json->ip:$json->port";
  17. }
  18. curl_close($ch);}
  19.  
  20. $ch = curl_init();
  21. $proxy = getProxy();
  22. while (!checkProxy($proxy)) {
  23. $proxy = getProxy();
  24. }
Add Comment
Please, Sign In to add comment