Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

In my localhost PHP file test.php, I use php function file_get_contents to grab a forum index page.

echo file_get_contents('http://www.XX.com/forum.php');

when the forum data, sunch as posting , member changes, I refresh the test.php, content is hasn't changed, I want to know why?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
280 views
Welcome To Ask or Share your Answers For Others

1 Answer

There are a number of possible reasons:

  • You are behind a caching proxy server and are receiving a cached copy of the page
    • This can exist at the network or server level
  • The target site detects such requests and provides cached versions for performance or security reasons
  • Your browser has cached the output of your script.

You will need to examine your configuration, talk to your network administrator, or check your own browser's cache to find the source of the problem.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...