PHP Classes

File: simple-example.php

Recommend this page to a friend!
  Classes of Pawel Antczak   Sitemap Generator   simple-example.php   Download  
File: simple-example.php
Role: Example script
Content type: text/plain
Description: simple example
Class: Sitemap Generator
Generate sitemaps and notify updates
Author: By
Last change:
Date: 13 years ago
Size: 1,428 bytes


Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
// include class
include 'SitemapGenerator.php';

// create object
$sitemap = new SitemapGenerator("");

// add urls
$sitemap->addUrl("", date('c'), 'daily', '1');
$sitemap->addUrl("", date('c'), 'daily', '0.5');
$sitemap->addUrl("", date('c'), 'daily');
$sitemap->addUrl("", date('c'));
$sitemap->addUrl("", date('c'), 'daily', '0.4');
$sitemap->addUrl("", date('c'), 'daily');
$sitemap->addUrl("", date('c'));

// create sitemap

// write sitemap as file

// update robots.txt file

// submit sitemaps to search engines