This is an example of how to chain proxies.
<?php
require '../websock2.php';
$proxy1->setAuth('login', 'password');
$proxy2 = new Socks4aProxy('socks4a.proxy.address', 808);
$proxy3 =
new HttpProxy(
'http.proxy.address', 777);
$proxy3->setSocket($proxy2);
$proxy2->setSocket($proxy1);
$proxy1->setSocket($socket);