Mobile app version of vmapp.org
Login or Join
Debbie626

: I'd create a sitemap, then use some code like this (example is in PHP), to ping the sitemap to the major search engines. function ping_sitemap($sitemap_url) { $pingurls = array(

@Debbie626

I'd create a sitemap, then use some code like this (example is in PHP), to ping the sitemap to the major search engines.

function ping_sitemap($sitemap_url) {
$pingurls = array(
"http://www.google.com/webmasters/tools/ping?sitemap=",
"http://submissions.ask.com/ping?sitemap=",
"http://www.bing.com/webmaster/ping.aspx?siteMap="
);

foreach ($pingurls as $pingurl) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $pingurl.$sitemap_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
curl_close($ch);
}
}


$sitemap_url needs to be the whole URL, starting with , not a relative one.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Debbie626

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme