$v) { if (is_array($v)) { strip_slashes_from_user_data($array[$k]); continue; } $array[$k] = stripslashes($v); } } if (get_magic_quotes_gpc()) { strip_slashes_from_user_data($_GET); strip_slashes_from_user_data($_POST); strip_slashes_from_user_data($_COOKIE); } if (!empty($_POST['send'])) { if (!empty($_POST['link'])) { $_POST['text'] .= "\n\n[a=".$_POST['link']."]".$_POST['link']."[/a]"; } $_POST['text'] = str_replace("\r", "", $_POST['text']); $_POST['text'] = preg_replace("/\n{2,}/", "

", $_POST['text']); $login = trim($_POST['pseudo']); if ($login[0] != '#') $login = '#' . $login; $params = array( new XML_RPC_Value($login, 'string'), new XML_RPC_Value($login, 'string'), new XML_RPC_Value($_POST['pass'], 'string'), new XML_RPC_Value(array( 'title' => new XML_RPC_Value(utf8_encode($_POST['title']), 'string'), 'description' => new XML_RPC_Value(utf8_encode($_POST['text']), 'string'), ), 'struct'), new XML_RPC_Value(!empty($_POST['online']), "boolean"), ); $message = new XML_RPC_Message('metaWeblog.newPost', $params); $client = new XML_RPC_Client("/api/xmlrpc.php", "www.skyrock.com", 80); $result = $client->send($message); //print_r($result); header('Location: ./' . basename(__FILE__) . '?pseudo=' . urlencode($_POST['pseudo']) . '&id=' . (int)$result->xv->me['string']); exit; } echo ' Planet '; if (!empty($_GET['id']) && is_numeric($_GET['id']) && !empty($_GET['pseudo'])) { $url ='http://' . htmlspecialchars(urldecode($_GET['pseudo'])) . '.skyrock.com/article_' . (int) $_GET['id'] . '.html'; echo '

Article posté : '.$url.'

'; } echo '
Identifiants
Pseudo
Mot de passe API

(Quel est mon mot de passe ?)
Nouvel article
Titre
Texte
Lien

'; ?>