if (checkIFTTTlogin($obj->user, $obj->pass) == "error") { failure(401); } else { success('<array><data></data></array>'); break; } case 'metaWeblog.newPost': __log("metaWeblog.newPost"); //@see http://codex.wordpress.org/XML-RPC_WordPress_API/Posts#wp.newPost $obj = new stdClass(); //get the parameters from xml $obj->user = (string) $xml->params->param[1]->value->string; $obj->pass = (string) $xml->params->param[2]->value->string; __log("Username: "******"Password: "******"error") { __log("checkIFTTTlogin:401"); failure(401); } else { //@see content in the wordpress docs $content = $xml->params->param[3]->value->struct->member; foreach ($content as $data) { switch ((string) $data->name) { //we use the tags field for providing webhook URL case 'mt_keywords': $url = $data->xpath('value/array/data/value/string'); $url = (string) $url[0]; $body = $url; break; //the passed categories are parsed into an array
<?php require_once dirname(__FILE__) . '/load.php'; $username = $_GET['username']; $password = $_GET['password']; echo checkIFTTTlogin($username, $password); ?> <br> <?php print_r(checkIFTTTlogin($username, $password));