Write to online file with webplayer

I know that the WWW or WWWForm class should be used in conjunction with a server side script such as PHP, but I can not get it to work. I am basically doing this:

var www : WWW;
var form = new WWWForm();
form.AddField("frameCount", Time.frameCount.ToString());
www = WWW(url, form); //upload to script
yield www;

Where "url" is a PHP script in the cgi-bin folder on the server where the webplayer is. The PHP script is:

<?php
$filename = 'test.txt';
$Content = "Add this to the file
";
$handle = fopen($filename, 'x+');
fwrite($handle, $Content);
fclose($handle);
?>

I know I am not using "frameCount", but I do not know of an alternative way to put WWW in POST mode. Anyway, this does not produce "test.txt" or write to "test.txt" if I create the file on the server. What am I doing wrong? I know I have access to the PHP script in Unity because I can display its contents in GUIText using the following:

var www : WWW = new WWW (url);
var form = new WWWForm();

yield www; // Wait for download to complete

if (www.error != null)
    this.GetComponent(GUIText).text = www.error;
else
    this.GetComponent(GUIText).text = www.text; 

If you'r trying to add what Unity sends to the server, maybe you shall do something like this in the PHP script.

<?php
$filename = 'test.txt';
$Content = $_POST['frameCount'];
$handle = fopen($filename,"w");
fwrite($handle, $Content);
fclose($handle);
?>

Note this will probably overwrite whatever's in there, i can add som code for you if you want to ADD the frameCount to the file instead.