Proxy
Client supports operation via HTTP and HTTPS proxies.
$http = new HttpClient([ 'proxyHost' => '185.135.157.89', 'proxyPort' => '8080', ]);
For URL http:// client will make a query via proxy with indicated full URL as follows:
GET http://www.bitrix24.com/ HTTP/1.1
For address https://, client will use the CONNECTmethod to proxy. After establishing a tunnel to the host, socket will switch to a protected mode and then the exchange with the host proceeds as usual:
CONNECT www.bitrix24.com:443 HTTP/1.1
Make sure, that proxy servers can be quite limiting and continuous operation isn't guaranteed. However, you can benefit from using CURL because of its more developed proxy support.
© «Bitrix24», 2001-2024