2011-07-19 46 views

回答

0

使用XMLRPC。類似這樣的:

$params = array(0,$username,$password,$content,true); 
$request = xmlrpc_encode_request('metaWeblog.newPost',$params); 
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_POSTFIELDS, $request); 
curl_setopt($ch, CURLOPT_URL, $rpcurl); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_TIMEOUT, 1); 
$results = curl_exec($ch); 
curl_close($ch); 
相關問題