
Untitled
By: a guest on
Jul 29th, 2012 | syntax:
None | size: 0.46 KB | hits: 13 | expires: Never
PHP XML-RPC Multisite getposts
require 'class-IXR.php';
$ address = "http://localhost/ ~ wordpress1 / xmlrpc.php";
$ q = new IXR_Client ($ address);
if ($ q-> query ('wp.getPosts', 1,' admin ', '1234qwer')) {
echo $ q-> getErrorCode (). ':'. $ q-> getErrorMessage ();
}
$d = $q-> getResponse ();
//print_r ($ q-> getResponse ());
$ new = array ();
foreach ($ d as $ t)
{
//print_r ($ t);
$ new [] = array ('name' => $ t ['post_name'], 'id' => $ t ['post_id']);
}