cURL request using socks5 proxy fails when using PHP, but it works through the command line
cURL + proxy noob here, having a hard time. I'm having trouble trying to retrieve a web page from a remote secure server via a proxy. Everything has apparently been set up correctly by a remote dev, such that the following command line instruction works and returns what we're looking for: curl -k --socks5-hostname localhost:xxxx https://hostname/ However, the following PHP does not echo the requested webpage. Instead it echoes the error 'Couldn't resolve host name': $proxy = 'localhost:xxxx'; $url = 'https://hostname/'; //$proxyauth = 'user:password'; $ch = curl_init(); curl_setopt($ch,