I have locally set 2 Apache Server on Port 80 and port 81 using XAMPP. Iam successfully able to access them through my browser. Currently the URL can be accessed at
Try this:
curl_setopt($ch, CURLOPT_PORT, $_SERVER['SERVER_PORT']);
Try this
curl_setopt ($ch, CURLOPT_PORT , 81);
Update code:-
see this URL:- php curl problem
$ch = curl_init();
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_URL, 'http://27.4.198.225:81/ncmsl/check.php');
$store = curl_exec ($ch);
echo substr($store, 1);
curl_close ($ch);
Use this one for specify port,
curl_setopt($ch, CURLOPT_PORT, 81);
Take a look at CURLOPT_PORT in the manual for curl_setopt()