public function receive()
{
foreach (array('url', 'title', 'blog_name', 'excerpt') as $val) {
if (empty($_POST[$val])) {
$this->set_error('The following required POST variable is missing: ' . $val);
return FALSE;
}
$this->data['charset'] = isset($_POST['charset']) ? strtoupper(trim($_POST['charset'])) : 'auto';
if ($val !== 'url' && MB_ENABLED === TRUE) {
if (MB_ENABLED === TRUE) {
$_POST[$val] = mb_convert_encoding($_POST[$val], $this->charset, $this->data['charset']);
} elseif (ICONV_ENABLED === TRUE) {
$_POST[$val] = @iconv($this->data['charset'], $this->charset . '//IGNORE', $_POST[$val]);
}
}
$_POST[$val] = $val !== 'url' ? $this->convert_xml(strip_tags($_POST[$val])) : strip_tags($_POST[$val]);
if ($val === 'excerpt') {
$_POST['excerpt'] = $this->limit_characters($_POST['excerpt']);
}
$this->data[$val] = $_POST[$val];
}
return TRUE;
}