XML Generator Sitemap Generator
  • EN English
  • RU
Contact Customer Service
Contact us if you need help!
Indexing Cyrillic Domains
Plans and Pricing Buy access PIN Webmaster Help Center Customer Support
Sitemap generatorSitemap GeneratorAbout XML SitemapFAQ

API usage example

API Documentation

Class connection:

    include_once('{  }/mysitemapgenerator.lib.php');
    $key={yourAPIkey};

Class initialization:

    $API=new MySitemapGenerator($key);

By default, a JSON object is returned, but you can predetermine the returned data as a normal array:

    $API->returntype="array";

And also enable the mode of explanations output:

    $API->debug=true;

Get balance:

    echo '<pre>';
        print_r( $API->call("getBalance") );
    echo '</pre>';

Get a list of updatable Sitemaps:

    echo '<pre>';
        print_r( $API->call("SitemapsGetList") );
    echo '</pre>';

Get a Sitemap file for the site with ID 12345:

    $params=Array(
        "cid"=>12345,
    );
    echo '<pre>';
        print_r( $API->call("SitemapsGetFiles",$params) );
    echo '</pre>';

Create a new updatable Sitemap for the www.mysite.com site and update mode "every Monday". If successful, its ID is returned:

    $params=Array(
        "site_url"=>"http://www.mysite.com/",
        "access_point"=>'Monday',
    );
    echo '<pre>';
        print_r( $API->call("SitemapsCreate",$params) );
    echo '</pre>';

Change the Sitemap update settings for the site with ID 12345. In the example we change the update mode to Sunday and the way the crawler is identified:

    $params=Array(
        "cid"=>12345,
        "access_point"=>"Sunday",
        "site_useragent"=>"google",
    );
    echo '<pre>';
        print_r( $API->call("SitemapsCreate",$params) );
    echo '</pre>';

Delete site with ID 12345 from the list of updatable Sitemaps:

    $params=Array(
        "cid"=>12345,
    );
    echo '<pre>';
        print_r( $API->call("SitemapsRemove",$params) );
    echo '</pre>';
Follow us to keep up with all the news!
Share Service!
©Sitemap Generator - Online Generator
VisaMasterCard Secure
x
This website uses cookies. Using this website means you're agreeing with this. More info Accept