<?php
// Get charset of save data.
$charset = trim(substr(strrchr($_SERVER['CONTENT_TYPE'], ";"), 1));
//Set HTTP header. (Must be an XHTML or XML file, not text/html)
header('Content-type: application/xhtml+xml; '.$charset);
//Set XML declaration and character encoding.
echo '<?xml version="1.0" encoding="'.$charset.'"?>'."\n";
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Return POSTed data</title>
</head>
<body>
<mozile xmlns="http://www.mozile.mozdev.org/ns/save/">
<post>
<status>1</status>
<statustext>Test File, returns POSTed data.</statustext>
<display>yes</display>
</post>
</mozile>
<hr />
<h1>status: 1</h1>
<h1>statustext: Test File, returns POSTed data.</h1>
<hr />
<pre>
<?php
// id is available when saving a single editable area.
if ( isset($_GET['MozileID']) ) {
echo "\n".'$_GET[\'MozileID\'] : ';
echo htmlspecialchars($_GET['MozileID']);
}
// Content-type and charset.
echo "\n".'$_SERVER[\'CONTENT_TYPE\'] : ';
echo htmlspecialchars($_SERVER['CONTENT_TYPE']);
// Size of saved data in bytes.
echo "\n".'$_SERVER[\'CONTENT_LENGTH\'] : ';
echo htmlspecialchars($_SERVER['CONTENT_LENGTH']);
// Name of file being saved.
echo "\n".'$_SERVER[\'HTTP_CONTENT_LOCATION\'] : ';
echo htmlspecialchars($_SERVER['HTTP_CONTENT_LOCATION']);
?>
</pre>
<hr />
<h1>POST DATA : file_get_contents('php://input')</h1>
<hr />
<pre>
<?php
$post_data = file_get_contents('php://input');
//Strip CR/LF pair from beginning and end of data.
$post_data = substr($post_data, 2, strlen($post_data)-4);
echo htmlspecialchars($post_data, ENT_NOQUOTES );?>
</pre>
<hr />
<?php
/*
// If you uncomment these lines you can write the POSTed data to temp files to
// check the data is saved as it should be.
// (Remember to use a binary safe write to file.)
//$fp1 = fopen( "temp.html", "wb" );
//fwrite($fp1, $post_data, strlen($post_data));
//$fp2 = fopen( "temp.xhtml", "wb" );
//fwrite($fp2, $post_data, strlen($post_data));
*/
?>
</body>
</html>
Bold and italic text. Superscript: 1001.25. Reference345 uses a subscript. Bold and italic.
Bold and italic and underlined and struck through text. Superscript: 1001.25. Reference345 uses a subscript. Bold, italic and underlined.
àáâãäå (...as HTML character entities)
à áâãäå (...as UTF-8 )
àáâãäå (...as ISO-8859-1 )
©© ®® ÀÀ àà ££ ¢¢ ¥¥ ¤¤
€€ ΒΒ ββ
"&<>
Editable paragraph with small text.
Editable paragraph with big text.
This is a non-editable paragraph nested in the editable <div>.
It has the in-line style "-moz-user-modify: read-only;".
This bold text should be editable.
It has the in-line style "-moz-user-modify: read-write;".
[NB : Nested sections are not currently supported with Mozile. You can quite easily delete this whole paragraph,
even though some of it is "read-only".]
| 1 | space (can't edit!) | |
| 2 | non-break-space, as character entity [ ] | |
| 3 | non-break-space, as numeric entity [ ] | |
| 4 | non-break-space, ISO-8859-1 | |
| 5 | non-break-space, UTF-8 | Â |
<?php
header("Content-type: text/xml");
echo '<?xml version="1.0" ?>'."\n";
?>
<rsd version="1.0">
<settings>
<setting name="mes">XHTML</setting>
<setting name="tagCSS">XHTML</setting>
<setting name="pasteMode">text</setting>
<setting name="savePresetDisallow">all</setting>
<setting name="saveContent">current</setting>
<setting name="saveMethod">post</setting>
<setting name="saveMethodDisallow">webdav</setting>
<setting name="httpSavePath">save_dump.php</setting>
<setting name="httpSavePathModify">false</setting>
</settings>
</rsd>