Can curl make a connection to any TCP ports, not just HTTP/HTTPS?

curl, php

Solution

Since you're using PHP, you will probably need to use the `CURLOPT_PORT` option, like so:

`curl_setopt($ch, CURLOPT_PORT, 11740);`

Bear in mind, you may face problems with SELinux:

Unable to make php curl request with port number

Problem

Can `curl` make a connection to any TCP ports not just HTTP/HTTPS I need to check for an open port, for example: `11740`. Is this possible?

Original source

Related problems