あなたは以下のmulti-site.Hereに新しいパスで新しいブログを作成するための単一のメソッド呼び出しを行う必要がありWordPressのマルチサイトのプラグインhere。あなたが使用する必要がありますApacheのXML-RPC APIを使用する例であります
public class Demo
{
public static void main(String[] args)
{
System.out.println("Starting adicXmlRpcServer test");
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
try
{
config.setServerURL(new URL("http://localhost/wordpress/xmlrpc.php"));
}
catch (MalformedURLException ex)
{
System.out.println("Invalid url....."+ex.getMessage());
ex.printStackTrace();
}
XmlRpcClient client = new XmlRpcClient();
client.setConfig(config);
Map map = new HashMap();
map.put("domain","localhost");
map.put("path","/newStrore");
map.put("title","newStrore");
map.put("user_id","[email protected]");
Object[] params = new Object[] {new String("admin"),new String("9868"),map};
try
{
Object result = (Object) client.execute("ms.CreateBlog",params);
ArrayList<String> dirListing = new ArrayList<String>();
System.out.println(result.toString());
}
catch (XmlRpcException ex)
{
System.out.println("Invalid url....."+ex.getMessage());
ex.printStackTrace();
}
}
}