My host GoDaddy no longer supports
file('http://www.google.com/webmasters/sitemaps/ping?sitemap=' . $google->submit_url));
This is a solution that works for me... for now at least... until I find a better solution... and some more dotdotdots... :smile:
I have this above "if ($submit){"
function ExtractString($str, $start, $end) {
$str_low = strtolower($str);
$pos_start = strpos($str_low, $start);
$pos_end = strpos($str_low, $end, ($pos_start + strlen($start)));
if ( ($pos_start !== false) && ($pos_end !== false) ) {
$pos1 = $pos_start + strlen($start);
$pos2 = $pos_end - $pos1;
return substr($str, $pos1, $pos2);
}
}
And this between the "Start Pinging..." and "End Pinging..."
echo '<br />Start Pinging ----------------------------------------------------------------------------------------';
if(isset($_GET['pinggoogle']) && $_GET['pinggoogle'] == 'yes') {
echo '<br />Google Ping...<br />';
echo '<div style="background-color: #FFFFCC; border: 1px solid #000000; padding: 5px">';
/***************/
$ch = curl_init("http://www.google.com/webmasters/sitemaps/ping?sitemap=". $google->submit_url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$curl_results = curl_exec($ch);
curl_close($ch);
$bodytxt = ExtractString($curl_results, "<h2>", "</h2>");
echo $bodytxt;
/***************/
echo '</div>';
}
if(isset($_GET['pingyahoo']) && $_GET['pingyahoo'] == 'yes') {
echo '<br />Yahoo! Ping...<br />';
echo '<div style="background-color: #FFFFCC; border: 1px solid #000000;">';
/***************/
$ch = curl_init("http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap=". $google->submit_url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$curl_results = curl_exec($ch);
curl_close($ch);
$bodytxt = $curl_results;
//$bodytxt = ExtractString($curl_results, "<Message>", "</Message>");
echo $bodytxt;
/***************/
echo '</div>';
}
if(isset($_GET['pingask']) && $_GET['pingask'] == 'yes') {
echo '<br />Ask.com Ping...<br />';
echo '<div style="background-color: #FFFFCC; border: 1px solid #000000;">';
/***************/
$ch = curl_init("http://submissions.ask.com/ping?sitemap=". $google->submit_url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$curl_results = curl_exec($ch);
curl_close($ch);
$bodytxt = ExtractString($curl_results, "<h1>", "</h1>");
echo $bodytxt;
/***************/
echo '</div>';
}
if(isset($_GET['pingms']) && $_GET['pingms'] == 'yes') {
echo '<br />Microsoft Ping...<br />';
echo '<div style="background-color: #FFFFCC; border: 1px solid #000000;">';
/***************/
$ch = curl_init("http://www.moreover.com/ping?u=". $google->submit_url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$curl_results = curl_exec($ch);
curl_close($ch);
$bodytxt = $curl_results;
echo $bodytxt;
/***************/
echo '</div>';
}
echo '<br />End Pinging ----------------------------------------------------------------------------------------<br />';
use at your own risk... I take no responsibility nor support any of the above code... blah blah blah... legaleze mumbo jumbo...