Hi,
I'm trying to insert incoming data from teaxarea into txt (can be without extention as well) file but the incoming data is being manipulated automatically which I don't want. I need to insert as is.
How can I solve this problem?
Thanks
My codes to insert:
$handle = fopen('cms/files' . $_POST['hidden_file_name'], 'w');
fwrite($handle, $_POST['textarea_content']);
fclose($handle);
OR
file_put_contents('cms/files/' . $_POST['hidden_file_name'], $_POST['textarea_content']);
Incoming data:
<iframe width="560" height="349" src="http://www.youtube.com/embed/1232123123456240" frameborder="0"></iframe>
When inserted into TXT file it appears like this:
<span class=\"webkit-html-tag\" style=\"font-size: medium; font-family: monospace; white-space: pre-wrap; \"><iframe <span class=\"webkit-html-attribute-name\">width</span>=\"<span class=\"webkit-html-attribute-value\">560</span>\" <span class=\"webkit-html-attribute-name\">height</span>=\"<span class=\"webkit-html-attribute-value\">349</span>\" <span class=\"webkit-html-attribute-name\">src</span>=\"<a class=\"webkit-html-attribute-value webkit-html-resource-link\" target=\"_blank\" href=\"http://www.youtube.com/embed/12312134233110\">http://www.youtube.com/embed/b34d6FSHPxU</a>\" <span class=\"webkit-html-attribute-name\">frameborder</span>=\"<span class=\"webkit-html-attribute-value\">0</span>\"></span><span class=\"webkit-html-tag\" style=\"font-size: medium; font-family: monospace; white-space: pre-wrap; \"></iframe></span><br>