PHP cURL To Custom Ports (Flask) If you are having issues using cURL in PHP to a non-standard port (e.g 80, 443) then most like you have not added the CURLOPT_PORT.