# Xml from php

**URL:** <https://forum.kirupa.com/t/xml-from-php/226209>\
**Category:** Uncategorized\
**Created:** [May 18, 2007, 9:14pm UTC](https://forum.kirupa.com/t/xml-from-php/226209 "2007-05-18T21:14:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smeee](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/smeee/32/2805_2.png) [@smeee](https://forum.kirupa.com/u/smeee)\
**Post date:** [May 18, 2007, 9:14pm UTC](https://forum.kirupa.com/t/xml-from-php/226209/1 "2007-05-18T21:14:34Z")

</div>

My problem is as follows: I have a php page generating xml for me depending on vars passed by GET. ie, data.php?category=2 would return xml for section 2. This is great for flash but I’m trying to call it from another php file. If i use fopen(data.php) I get uncompiled source code. If i use simplexml\_load\_file(“data.php”) I get errors. I think it doesn’t like the \<?php at the beginning. Has anyone ever run into a similar problem? Thanks.
