I want to use php sockets via proxy. I use the following code for socket create
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
$result = socket_connect($socket, some_ip, 443);
And setting the proxy via :
$aContext = array(
'http' => array(
'proxy' => 'tcp://191.96.x.xx:1212',
),
);
stream_context_set_default($aContext);
But when I test it using trace route it does not go through the proxy. Traceroute - https://www.adayinthelifeof.nl/2010/07/30/creating-a-traceroute-program-in-php/
Also I tried using the environment variable http_proxy=http://proxy.example.com:8080
but id doesn't go through the proxy