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

  • Home
  • SEARCH
  • 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 364091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:24:18+00:00 2026-05-12T13:24:18+00:00

I am doing some automation for a client and was planning on running some

  • 0

I am doing some automation for a client and was planning on running some php scripts via cURL in the process. However URLs that work fine in a browser are coming up 404 when hit by cURL. I have seen mention elsewhere that some servers are configured to block cURL in this manner.

Is this a setting I could edit in httpd.conf? Doesn’t seem to be in php.ini.

My code is like so:

  $url = "http://site.com/xxx/curl.php?cID=$c->cID&db=$c->db&un=$c->un&/";
  echo "$url";

  // spoofing FireFox 2.0
  $useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) 
    Gecko/20061204 Firefox/2.0.0.1";
  $ch = curl_init ($url) ;
  curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1) ;
  curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  $res = curl_exec ($ch);

When I echo $res I get the code from the default 404 error page. If I copy the echoed $url and paste into browser I get the page fine. Also tried using relative path and full server path.

The user agent spoofing was added today to try to see if saying I wasn’t cURL would help but nothing in the response changed.

Any thoughts on how to track down the root cause of this or better yet solve it?

  • 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-05-12T13:24:18+00:00Added an answer on May 12, 2026 at 1:24 pm

    It turns out that the kind folks at The Planet have some internal routing issues with this account. Bad hostname settings in /etc/sysconfig/network and bad resolvers in /etc/resolv.conf among other things. This and a number of other sites were recently migrated from one of their servers to another. Not fixed yet but that was why the 404.

    Thanks.

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

Sidebar

Related Questions

I am doing some automation work that requires several reboots. I am trying to
I am doing some COM Interop work with Excel and other Office Automation Software.
I'm doing some automation work and can make my way around a site &
I'm doing some web automation via C# and a WebBrowser. There's a link which
Okay, so I'm doing some good OLE' (sorry) automation with ruby and I ran
In doing some bioinformatics work, I've been pondering the ramifications of storing object instances
While doing some refactoring I've found that I'm quite often using a pair or
I am doing project in powerpoint 2007 automation. In that i am using macro
I'm doing some basic automation type stuff and I need to send ctrl-space to
I am considering doing some automation of tasks on my Windows desktop (e.g. sorting

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.