Monday, June 7, 2021

How to resolve Failed to connect to port 443: Network is unreachable when using curl with PHP?

 Add the following lines to the code. This might solve the problem.

$proxy="abc-proxy.example.com";
$proxyPort=80;
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYPORT, $proxyPort);

No comments:

Post a Comment

Please add value. Sharing is caring