PHP Curl on 81 port

后端 未结 4 799
野的像风
野的像风 2020-12-20 22:45

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

相关标签:
4条回答
  • 2020-12-20 23:31

    Try this:

    curl_setopt($ch, CURLOPT_PORT, $_SERVER['SERVER_PORT']);
    
    0 讨论(0)
  • 2020-12-20 23:33

    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);
    
    0 讨论(0)
  • 2020-12-20 23:35

    Use this one for specify port,

    curl_setopt($ch, CURLOPT_PORT, 81);
    
    0 讨论(0)
  • 2020-12-20 23:40

    Take a look at CURLOPT_PORT in the manual for curl_setopt()

    0 讨论(0)
提交回复
热议问题