Advertisement
BugAR

get ip

Jul 2nd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. <?
  2. $proxylist = curl_init();
  3. curl_setopt($proxylist, CURLOPT_URL, "https://www.torvpn.com/en/proxy-list");
  4. curl_setopt($proxylist, CURLOPT_RETURNTRANSFER, 1);
  5. $response = curl_exec($proxylist);
  6. preg_match_all('/<td><img src="(.*?)" alt="IP address" \/><\/td>
  7.        <td>(.*?)<\/td>/s', $response, $matches);
  8. foreach ($matches[1] as $image) {
  9.     foreach ($matches[2] as $port) {
  10.         $ip = imagecreatefrompng($image);    
  11.         imagecolortransparent($ip,  imagecolorat($ip, 0, 0));
  12.         #############################################
  13.         echo "$ip:$port<br>";
  14.         ############################################
  15.     }
  16. }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement