cURL不在服务器上工作

I'm want to make a call to a public IP adress, and on my localhost it works fine. So I tested it on the server and it is not working. I get this message back

cURL Error #:Failed connect to 95.97.124.124:23; Connection timed out

This is the code i'm using, it is copied from postman

<?php

$curl = curl_init();
set_time_limit(0);
curl_setopt_array($curl, array(
    CURLOPT_PORT => "23", // PORT NEEDED TO CALL SERVER
    CURLOPT_URL => "http://95.97.124.124:23",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Cache-Control: no-cache",
        "Postman-Token: 36b6ae24-1940-7227-5994-a5176f5006f3"
    ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $response;
}

I changed some things but it still doesn't work, please help. Thanks in advance