Wordpress XMLRPC returning blank, but successful
Sod's law. After posting I tried changing the max timeout time: curl_setopt($ch, CURLOPT_TIMEOUT, 1);
to 10: curl_setopt($ch, CURLOPT_TIMEOUT, 10);
and I get some nice XML returned with the post ID embedded.
I haven't deleted this post as I thought it might be useful for someone.
It will return ($results) the results as xml ... I think in your program it wont display anything in screen ( But u can see that xml data in source code of the output screen ) .. You should use xmlrpc_decode or XML parsing function to get the data from returned XML .. In your program it will return the newly created post id.
For your program, I think folowing changes will do the work
$results = curl_exec($ch);$results = xmlrpc_decode($results);echo '<pre>'.print_r($results, true).'</pre>';