PHP File Name

Hi, I’m very new to PHP, so bear with me. I’m sending text from Flash to a PHP script so that it can be written to a text or xml file. Here’s the script:

<?php
$filename = “myFolder/results.xml”;
$raw_xml = file_get_contents(“php://input”);

print $raw_xml;

$fp = fopen($filename, “w”);
fwrite($fp, $raw_xml);
fclose($fp);
?>

This works fine, but what I’d like to do is name the output file from flash. Would it be possible to do something like set a variable that’s from the first word of the input file’s contents, and use that as the file name?

Thanks.