Advertisement
Guest User

Socks 5 Server Gateway

a guest
Oct 18th, 2011
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2.     include("socks5.php");
  3.    
  4.     $server_name = "www.google.com";
  5.     $server_port = 80;
  6.     $socks = new socks5("127.0.0.1", 3128);
  7.    
  8.     if ($socks->connect($server_name, $server_port)) {
  9.         $headers[] = "GET / HTTP/1.1";
  10.         $headers[] = "Host: $server_name:$server_port";
  11.         $packet = join("\r\n", $headers)."\r\n\r\n";
  12.         $responce = $socks->send($packet);
  13.         echo $responce;
  14.     }
  15.  
  16.     exit;
  17. ?>
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement