Jason Kohles

NAME

WWW::Google::SiteMap::Ping - DEPRECATED - See Search::Sitemap

DEPRECATED

Now that more search engines than just Google are supporting the Sitemap protocol, the WWW::Google::SiteMap module has been renamed to Search::Sitemap.

SYNOPSIS

  use WWW::Google::SiteMap::Ping;
  
  my $ping = WWW::Google::SiteMap::Ping->new(
    'http://www.jasonkohles.com/sitemap.gz',
  );
  
  $ping->submit;
  print "These pings succeeded:\n";
  foreach($ping->success) {
    print "$_: ".$ping->status($_)."\n";
  }
  print "These pings failed:\n";
  foreach($ping->failure) {
    print "$_: ".$ping->status($_)."\n";
  }

DESCRIPTION

This module makes it easy to notify Google that your sitemaps, or sitemap indexes, have been updated. See WWW::Google::SiteMap and WWW::Google::SiteMap::Index for tools to help you create sitemaps and indexes.

METHODS

new();

Create a new WWW::Google::SiteMap::Ping object. Can be given a list of URLs which refer to sitemaps or sitemap indexes, these URLs will simply be passed to url().

add_urls(@urls);

Add one or more urls to the list of URLs to submit to Google.

urls();

Return the list of urls that will be (or were) submitted to google.

submit

Submit the urls to Google, returns the number of successful submissions. This module uses LWP::UserAgent for the web-based submissions, and will honor proxy settings in the environment. See LWP::UserAgent for more information.

success();

Return the URLs that were successfully submitted. Note that success only means that the request was successfully received by Google, it does not mean your sitemap was found, loaded or parsed successfully. If you want to know whether your sitemap was loaded or parsed successfully, you have to go to http://www.google.com/webmasters/sitemaps and check the status there.

failure();

Return the URLs that were not successfully submitted.

user_agent();

If called with no arguments, will return the current LWP::UserAgent object which will be used to access the web-based submission. If called with an arugment, you can set the user agent that will be used in case you need to give it special arguments. It must be a LWP::UserAgent object.

If you call submit without having provided a user agent, one will be created for you that is a basic LWP::UserAgent object, which honors proxy settings in the environment.

MODULE HOME PAGE

The home page of this module is http://www.jasonkohles.com/software/WWW-Google-SiteMap. This is where you can always find the latest version, development versions, and bug reports. You will also find a link there to report bugs.

SEE ALSO

http://www.google.com/webmasters/sitemaps/docs/en/submit.html#ping

AUTHOR

Jason Kohles, <email@jasonkohles.com>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by Jason Kohles

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.