XHTML 1.0 Strict
Content-Type: application/xhtml+xml; charset=ISO-8859-1

POST Save target file: save_dump.php

<?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>


Return to test index

H1 Heading

H2: Paragraph with HTML presentational tags.

Bold and italic text. Superscript: 1001.25. Reference345 uses a subscript. Bold and italic.

H3: Paragraph with Mozile style span tags.

Bold and italic and underlined and struck through text. Superscript: 1001.25. Reference345 uses a subscript. Bold, italic and underlined.

H4 Heading : Non-ASCII characters
(Valid characters in both UTF-8 and ISO-8859-1.)

àáâãäå (...as HTML character entities)

àáâãäå (...as UTF-8 )

àáâãäå (...as ISO-8859-1 )

H5 Heading : Character entities

&copy;© &reg;® &Agrave;À &agrave;à &pound;£ &cent;¢ &yen;¥ &curren;¤

H5 Heading : Character entities
(...But not valid for ISO-8859-1 character set.)

&euro;€ &Beta;Β &beta;β

H6 Heading : HTML character entities

"&<> 

  1. Ordered list
  2. Second item
  3. Third item

testimage (5K) testimage (5K) testimage (5K)

Input, radio

Male Female

Input, text

First name:
Last name:
Title:

Input, select/optgroup/option

textarea
Input, submit/reset

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!)
2non-break-space, as character entity [&nbsp;] 
3non-break-space, as numeric entity [&#160;] 
4non-break-space, ISO-8859-1 
5non-break-space, UTF-8 

RSD Configuration file for this page.

<?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>