# Xml read problem after php://input

**URL:** https://forum.kirupa.com/t/xml-read-problem-after-php-input/67430
**Category:** Uncategorized
**Created:** [October 15, 2004, 7:51pm UTC](https://forum.kirupa.com/t/xml-read-problem-after-php-input/67430 "2004-10-15T19:51:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gf05856](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@gf05856](https://forum.kirupa.com/u/gf05856)
#### Post date: [October 15, 2004, 7:51pm UTC](https://forum.kirupa.com/t/xml-read-problem-after-php-input/67430/1 "2004-10-15T19:51:33Z")

</div>

When I change an attribute via flash through PHP with the code:

\<?php  
$filename = “readwrite/news.xml”;  
$raw\_xml = file\_get\_contents(“php://input”);  
print $raw\_xml;  
$fp = fopen($filename, “w”);  
fwrite($fp, $raw\_xml);  
fclose($fp);  
?\>

The newly produced XML file is something like this (all on 1 line):  
\<?xml version=“1.0” encoding=“utf-8” ?\>\<Events\>\<Event DateOf="[D…

When I do a reformat of the xml (in frontpage) I can read the content of the xml file again in flash. But not when its a 1 line xml file…

What part did I not read… a flash part of a php part, and how to solve this phenomenon???

Thanks for your reply.  
Frederik.
