PHP Classes
elePHPant
Icontem

File: test_socks.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of sergey cheeba  >  SOCKS 5  >  test_socks.php  >  Download  
File: test_socks.php
Role: Example script
Content type: text/plain
Description: socks5 class example
Class: SOCKS 5
TCP connection wrapper using SOCKS 5 protocol
Author: By
Last change:
Date: 10 years ago
Size: 444 bytes
 

Contents

Class file image Download
<?
   
include("socks5.lib.php");
   
   
$server_name = "www.google.com";
   
$server_port = 80;
   
$socks = new socks5("127.0.0.1", 3128)
   
    if (
$socks->connect($server_name, $server_port)) {
       
$headers[] = "GET / HTTP/1.1";
       
$headers[] = "Host: $server_name:$server_port";
       
$packet = join("\r\n", $headers)."\r\n\r\n";
       
$responce = $socks->send($packet);
        echo
$responce;
    }

    exit;
?>