PHP code example of medialam / proxy-server

1. Go to this page and download the library: Download medialam/proxy-server library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

medialam / proxy-server example snippets


use Serps\ProxyServer\ProxyServer;

$server = new ProxyServer();

// Adds a SOCKS4 proxy server listening on localhost:20104
$server->listenSocks4(20104, 'localhost');
// Adds a SOCKS5 proxy server listening on localhost:20105
$server->listenSocks5(20105, 'localhost');
// Adds a HTTP proxy server listening on localhost:20106
$server->listenHttp(20106, 'localhost');

// Starts all servers
$server->getLoop()->run();