Jump to content

Recommended Posts

Ok here's my problem.

 

I use simplexml_load_file to load the following xml file:

http://xboxapi.duncanmackenzie.net/gamertag.ashx?GamerTag=cerebal%20asassin

 

The file is dynamic and constantly changing and for my purpose I use simple_xml quite frequently. Now when it loads and pulls the data, on the following run it will still pull the same data even though the file has changed and can be noted in a web browser that it has. Is there any way to avoid simple_xml from caching the loaded file?

 

EDITED: mispelled the function, woops :)

Link to comment
https://forums.phpfreaks.com/topic/200995-simplexml_load_file-cache/
Share on other sites

It sounds like your web server is behind a caching proxy server.

 

It would certainly help if you provided some information about where your web server is hosted at relative to where the server with the xml document is hosted at and where the browser you are using is at relative to both of those.

 

Edit: To see if there is some cache between your web server and the offending site, add a random dummy GET parameter onto the end of the URL (making each request look like it is for a different URI) -

<?php
$ran = rand();
$url = "http://xboxapi.duncanmackenzie.net/gamertag.ashx?GamerTag=cerebal%20asassin&dummy=$ran";
?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.