Skip to content

zhornovy/Google-Sitemap-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google-Sitemap-Generator

  • Auto Crawl
  • Ignore broken links (404 error response)
  • Ignore mailto:// links
  • Ignore nofollow and noindex pages
  • Ignore URLs list
  • Checking allowed extensions
  • Custom user agent
  • Custom save path
  • SEO optimized
  • Complies with all requirements of the Sitemap standard
  • Easy to use
  • Cron friendly

Examples!

  • Simple
include "sitemap.php"
$xml_new = new SiteMapXML('yourwebsite.com');
$xml_new->makeXML();
include "sitemap.php"
$xml_new = new SiteMapXML('yourwebsite.com','https');
$xml_new->makeXML();
  • Advanced
include "sitemap.php"
$xml_new = new SiteMapXML('www.yourwebsite.com', 'https', '/home/user/public_html/sitemap_folder');
$xml_new->show_lastmod = false;
$xml_new->show_changefreq = true;
$xml_new->changefreq = SiteMapXML::WEEKLY;
$xml_new->user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) Custom Agent";
$xml_new->file_name = "sitemap-1.xml";
$xml_new->no_follow = array('/secret_url', '/login.php', '/404/'); //custom pages
$xml_new->allowed_extensions = array('.php', '.html');
$xml_new->makeXML();

Installation

Requires PHP v5.3+ No dependencies are needed.

  • Upload sitemap.php to your server
  • Create new php file or add to existing one
  • Include class and use it like in examples above

Development

Want to contribute? Great!

Free Software!

About

Sitemap auto generator for website using php

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages