skatermike21988 Posted May 7, 2010 Share Posted May 7, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/200995-simplexml_load_file-cache/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 7, 2010 Share Posted May 7, 2010 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"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/200995-simplexml_load_file-cache/#findComment-1054556 Share on other sites More sharing options...
skatermike21988 Posted May 7, 2010 Author Share Posted May 7, 2010 I actually just thought of that, unfortunately I can't try it right this second as my host is having issues with simple_xml and is trying to get it resolved. Quote Link to comment https://forums.phpfreaks.com/topic/200995-simplexml_load_file-cache/#findComment-1054572 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.