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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:45:54+00:00 2026-06-13T06:45:54+00:00

I have a PHP cURL request which gets another page on my domain. The

  • 0

I have a PHP cURL request which gets another page on my domain. The page which is being retrieved has linked files such as .css. When I update one of the .css files and upload it to the domain, then request the same page again, it returns the same version of the .css file with none of the updates that I just did. I then check the linked file on the domain to see if it was uploaded ok (which it is) and the url of the linked file in the returned page (which is pointing to the correct file).

I have even deleted all temp browser files to force it to look for a new version of the linked files, but it didn’t make a difference.

The request is completed successfully and there are no errors. I think it may be from cache or something like that. After an hour or so, when the page is requested again, the correct version of the .css file is returned within the returned page.

My cURL Request is the following:

$curl_handle=curl_init();
curl_setopt($curl_handle, CURLOPT_URL, $host . $requestURL);
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl_handle, CURLOPT_AUTOREFERER, TRUE);
curl_setopt($curl_handle, CURLOPT_FRESH_CONNECT, TRUE);
curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($curl_handle, CURLOPT_MAXREDIRS, 10);
curl_setopt($curl_handle, CURLOPT_DNS_USE_GLOBAL_CACHE, FALSE);
curl_setopt($curl_handle, CURLOPT_FORBID_REUSE, TRUE);
$content = curl_exec($curl_handle);
curl_close($curl_handle);
echo $content;

This has really confused me as i can’t seem to “force” get the latest version of a linked file.

Any ideas will be awesome!

  • 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-13T06:45:55+00:00Added an answer on June 13, 2026 at 6:45 am

    The problem is that you’re getting a cached copy of the css file. I believe there’s a header you can use to fix this, but if you don’t want to do that, add something like whatever.css?x=$random to the URL you’re requesting to hard force a new pull of the file. Not the best way, but it’ll likely work.

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

Sidebar

Related Questions

I have constructed a PHP file which scrapes a web page (using cURL) to
I have a PHP CURL request to an HTTPS site which takes a JSON
I have this curl request below, which was successfully troubleshooted in another post. Right
I have a PHP script that uses CURL to fetch a remote page and
I have a curl request as below, which should send a PUT request to
I have a curl procedure in php which returns xml or JSON from Google
I have a need to rename a file after download using php cURL. Here's
I have installed WAMP and running PHP scripts on localhost. I have enabled cURL.
I have to run a get request from a PHP script, but I'm in
I'm trying to use an API which sends a fax. I have a PHP

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.