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 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'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
I am doing some COM Interop work with Excel and other Office Automation Software.
We're currently doing some Word automation, and want to be able to insert a
After doing some work with Ruby, Rails, and RSpec last summer and I learned
I'm doing some PHP stuff on an Ubuntu server. The path I'm working in
I'm doing some funky authentication work (and yes, I know, open-id is awesome, but
I've been doing some HTML scraping in PHP using regular expressions. This works, but
I've been doing some mocking with RhinoMocks and it requires that mocked methods be
I'm doing some Objective-C programming that involves parsing an NSXmlDocument and populating an objects

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.