His code actually is not working correctly for websites that have like /ping/RPC2 like blogsearch of google
To make it work I had to replace his ping function to
Code:
function pingsite($sitetoping,$sourcetitle, $sourceurl, $debugping = false)
{
$content = <<<EOT
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>weblogUpdates.ping</methodName>
<params>
<param>
<value>
<string>$sourcetitle</string>
</value>
</param>
<param>
<value>
<string>$sourceurl</string>
</value>
</param>
</params>
</methodCall>
EOT;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $sitetoping);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true );
curl_setopt($ch, CURLOPT_POSTFIELDS, trim($content));
$result = curl_exec($ch);
curl_close($ch);
} //end function
With this you should be able to ping any website

obviously your php need be compiled with curl support