Jump to content

[SOLVED] Problems loading files with GET data in path


Mzor

Recommended Posts

I'm not 100% sure what the 'id=1' part in a URL such as 'index.php?id=1' is called, but nonetheless, I'm having some problems.

 

What I need to do is to load up some XML. The file path might be something like, '.xml?id=1', but when I try to load up the file either using fopen() or simplexml_load_file(), it loads the file as if it were simply the path without everything after the question mark.

 

I need a way around this, so that I can load data from a file dynamically.

 

Thanks!

Never mind, I figured out the problem wasn't that the values after the question mark.

 

The problem was simply that the server was giving me a version of the XML which had a stylesheet applied to it, messing it up.

 

So I changed the user_agent to latest version of Firefox which (somehow) gets the raw XML.

 

Sorry to be of bother.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.