Jump to content

[SOLVED] Problems loading files with GET data in path


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.

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.