# PHP file\_get\_contents

**URL:** <https://forum.kirupa.com/t/php-file-get-contents/159121>\
**Category:** programming\
**Created:** [August 15, 2005, 2:20am UTC](https://forum.kirupa.com/t/php-file-get-contents/159121 "2005-08-15T02:20:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GW02](https://avatars.discourse-cdn.com/v4/letter/g/c0e974/32.png) [@GW02](https://forum.kirupa.com/u/GW02)\
**Post date:** [August 15, 2005, 2:20am UTC](https://forum.kirupa.com/t/php-file-get-contents/159121/1 "2005-08-15T02:20:47Z")

</div>

Okay, I’m kind of a php n00b, having just come from the land of the asp.

I’m trying to use file\_get\_contents() to retrieve a file like so:  
$newsxml = file\_get\_contents ( “…\admin\sitecontent.php?type=0” );

It doesn’t work unless I remove the querystring. I took the stuff returned from the above php script and saved it as sitecontent.php.xml. And hey, what do you know, it works with the following code:  
$newsxml = file\_get\_contents ( “…\admin\sitecontent.php.xml” );

So my question is, how do I get the contents of a php script with a querystring?
