前回BlogIDを取るところまでやったので、その続きです。 画像をWordPressへアップロードする XML-RPC APIで、ローカルにある画像をサーバへ送信します。 とりあえず送信してURL取るところまでのコードです。 $imageFile = 'hoge.png'; $imagePath = '/images/' . $imageFile; $image = file_get_contents($imagePath); $extension = pathinfo($imagePath, PATHINFO_EXTENSION); $file = array( 'bits' => new XML_RPC_Value($image, 'base64'), 'name' => new XML_RPC_Value($imageFile, 'string'), 'type' => new XM