seqqueman
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Fixing WordPress
In reply to: XML-RPC wp.uploadFile breaks imagesGreat, thanks for your posts.
This is the code I use:<?php require('path/to/class-IXR.php'); $rpc = new IXR_CLIENT('http://myblog.com/xmlrpc.php'); $username = 'user'; $password = 'pass'; $url = "http://...JPG"; if(function_exists('file_get_contents')) { $image = array( 'name' => 'myTestImagenew.jpg', 'type' => 'image/jpg', 'bits' => new IXR_Base64(file_get_contents($url)), 'overwrite' => 0); $status = $rpc->query( 'wp.uploadFile', 1, $username, $password, $image); if(!$status){ echo 'Error ('.$rpc->getErrorCode().'): '.$rpc->getErrorMessage(); exit; }else{ $response = $rpc->getResponse(); echo 'The URL is: '.$response['url']; } } ?>Thanks frankb3 for your answer, I already did that twice, but after a day it stopped again, as you say is really annoying.
I have to say that is the publishing feature the only part that doesn’t work.Hi, did you solve the problem?
I have the same problem, the plugin is working fine for a day and then it stops working.
I deactivated and deleted the plugin and I reinstall it again, is working for a day and again it stops working.
Viewing 3 replies - 1 through 3 (of 3 total)