If you want to use PHP to request HTTP through a proxy server, you can use the proxy option .
Example:
$opts = array('http' =>
array(
'proxy' => 'tcp://proxy.example.com:5100',
)
);
$context = stream_context_create($opts);
$result = file_get_contents('http://example.com/somefile.html', false, $context);
source
share