This is my first attempt at PHP. I'm experienced with javascript and Perl, so please not too basic.
I have two errors.
This gives me a parse error.
$msgSplit = split('<hr>',$dataSplit[1]); // Split into seperate messages
if (count($msgSplit) > 10) { $msgSplit = array_pop($msgSplit) };
This returns the "...file not writable" message
if (is_writable($filename)) { // file is CHMOD to 755
if (!$fp = fopen($filename, 'w')) { echo "Cannot open file ($filename)"; exit; }
fwrite($fp,$dataSplit[0]);
fwrite($fp,$dataSplit[1]);
fwrite($fp,$dataSplit[2]);
fclose($fp);
} else { echo "The file $filename is not writable"; exit; }
This is probably simple, but I don't really know what I'm doing.