You can only check to see if the port is open, but you won't be able to perform fread/fwrite type functions with curl.
So, if you just want to check up/down status, you could try something like this:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"localhost:2593");
curl_setopt($ch...