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 8510133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:37:19+00:00 2026-06-11T03:37:19+00:00

This site has been up for several months now and has been working fine.

  • 0

This site has been up for several months now and has been working fine. I have a PHP page that creates an invoice from data in the url (e.g. viewinvoice.php?id=250 builds an invoice based on record 250). This page is accessible via a web browser and works fine.

On a completely different page (i.e. test.php) I’m trying to access that file via cURL. However, when I make the call and var_dump the results, I get bool(false).

Here’s the function that makes the cURL call:

function file_get_contents_curl($url) {
$ch = curl_init();

curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);

$data = curl_exec($ch);
curl_close($ch);

return $data;
}

HOME is a constant that denotes the full url (e.g. http://www.example.com/).

$invoice_contents = file_get_contents_curl(HOME.'viewinvoice.php?id=242');
echo $invoice_contents;
var_dump( $invoice_contents );

I’ve tried changing the url to an external url (i.e. http://www.google.com/) and the page loads just fine. I get google’s home page. But any page that’s in the same domain won’t load. Is there a reason that this would happen?

I am not the server admin, but I have root access to the server. I have not changed any settings recently, but the server admin may have upgraded the version of apache or php?

In any case, is there a setting I can modify to make this work again?

P.S. I just tried making this exact call from an external server (different domain) and it works just fine.

  • 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-11T03:37:20+00:00Added an answer on June 11, 2026 at 3:37 am

    After your curl execution, put something like this :

    echo curl_getinfo($ch) . '<br/>';
    echo curl_errno($ch) . '<br/>';
    echo curl_error($ch) . '<br/>';
    

    You’ll see what failed during your curl execution.

    More info : curl_getinfo curl_errno curl_error

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This has been frustrating me for a while now. I started developing a site
I have a site that has an Rss feed, and this feed is consumed
This is a question that I know has been asked here and several other
Hi all I know that this has been posted as a prior question several
I can see that this question has been asked several times, but none of
I have been using Netbeans for several months now and like it a lot.
We have an intranet page which has been around for several years and it
This one has been haunting me for quite a while now.. I have been
Getting this error with jquery & jquery.form. Site has been live for awhile..upgraded to
I was creating a website http://tapasya.co.in and i found that this site has some

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.