Search::Sitemap::Ping - Notify search engines of sitemap updates


Search-Sitemap documentation  | view source Contained in the Search-Sitemap distribution.

Index


NAME

Top

Search::Sitemap::Ping - Notify search engines of sitemap updates

SYNOPSIS

Top

  use Search::Sitemap::Ping;

  my $ping = Search::Sitemap::Ping->new(
    'http://www.jasonkohles.com/sitemap.gz',
  );

  $ping->submit;

  for my $url ( $ping->urls ) {
      print "$url\n";
      for my $engine ( $ping->engines ) {
          printf( "    %25s %s\n", $engine, $ping->status( $url, $engine ) );
      }
  }

DESCRIPTION

Top

This module makes it easy to notify search engines that your sitemaps, or sitemap indexes, have been updated. See Search::Sitemap and Search::Sitemap::Index for tools to help you create sitemaps and indexes.

METHODS

Top

new

Create a new Search::Sitemap::Ping object.

add_url( @urls )

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

urls

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

add_engine( @engines )

Add one or more search engines to the list of search engines to submit to.

engines

Return the list of search engines that will be (or were) submitted to.

submit

Submit the urls to the search engines, 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.

status( $url [, $engine ] )

Returns the status of the indicated submission. The URL must be specified, If an engine is specified it will return just the status of the submission to that engine, otherwise it will return a hashref of the engines that the url will be (or was) submitted to, and the status for each one.

The status may be one of:

* undef or empty string

Not submitted yet.

* 'SUCCESS'

Succesfully submitted. Note that this just means it was successfully transferred to the search engine, if there are problems in the file the search engine may reject it later when it attempts to use it.

* HTTP Error String

In case of an error, the error string will be provided as the status.

MODULE HOME PAGE

Top

The home page of this module is http://www.jasonkohles.com/software/Search-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

Top

Search::Sitemap

AUTHOR

Top

Jason Kohles, <email@jasonkohles.com>

COPYRIGHT AND LICENSE

Top


Search-Sitemap documentation  | view source Contained in the Search-Sitemap distribution.