Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8499585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:42:27+00:00 2026-06-11T00:42:27+00:00

I have locally set 2 Apache Server on Port 80 and port 81 using

  • 0

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

http://27.4.198.225/ncmsl/check.php 

and

http://27.4.198.225:81/ncmsl/check.php. 

When I try to write a simple curl code for them

$ch=curl_init();                    
$url = "http://27.4.198.225/ncmsl/check.php";
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt($ch, CURLOPT_URL, $url);
curl_exec($ch);
curl_close($ch);

It works perfectly fine for server at port 80 but doesn’t work for server at port 81, i.e.

$ch=curl_init();                    
$url = "http://27.4.198.225:81/ncmsl/check.php";
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt($ch, CURLOPT_URL, $url);
curl_exec($ch);
curl_close($ch);

What could be the possible reason? I have tried using CURLOPT_PORT but that also doesn’t work

These URL are LIVE URL. Can anybody check whether they are successfully able to access them using thei own CURL code on their own network

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:42:29+00:00Added an answer on June 11, 2026 at 12:42 am

    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
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have set up an Apache server running locally that hosts my web application
I have a SQL server / database locally and accessed through ip etc... What
I would rather have the DB locally on their server but do not have
Is there any way that I can set up Apache to run locally, specifically
I using XAMPP and I have configure it in order to have virtual hosts
I'm using only CCRC - I don't have ClearCase locally installed. I use CCRC
I've coded my website locally on the root of the server (WAMP running Apache
I've got a simple Ubuntu/django/apache server set up and I'm having trouble formatting some
I'm using SQL Server 2005. I have a query to a server that gives
Why doesn't my WCF service provide metadata locally, when I think I have set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.