Hi,
Yeah, sorry. I am that used to coming on here and someone helps me out with a solution, then I just say, that works, thanks, and mark the thread resolved.
Anyway, once I got it working, I decided to go for an extended ping, which is only a couple of extra items in the $parameters array, and of course a change to the $method var. Here is the solution:
<?php
$method = "weblogUpdates.extendedPing";
$params = array("My site","homepage-url","changes-url","feed-url");
$request = xmlrpc_encode_request($method,$params);
$context = stream_context_create(array('http' => array(
'method' => "POST /RPC2 HTTP/1.0",
'header' => "Content-Type: text/xml",
'header' => "Content-Length: 250",
'header' => "Host: ping.feedburner.com",
'header' => "User-Agent:LBaileysRPCPinger",
'content' => $request
)));
$file = file_get_contents("http://ping.feedburner.com/", false, $context);
$response = xmlrpc_decode($file);
if (xmlrpc_is_fault($response)) {
trigger_error("xmlrpc: $response[faultString] ($response[faultCode])");
} else {
print_r($file);
}
?>
I have actually changed it, so that the $response is encoded and put onto a query string, but running that, shows you it is working. changing the 'Host' header to rpc.weblogs.com and also the url in file_get_contents to the same, gives a more detailed success message.