Download the PHP package fayyaztech/sitemap-generator without Composer
On this page you can find all versions of the php package fayyaztech/sitemap-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fayyaztech/sitemap-generator
More information about fayyaztech/sitemap-generator
Files in fayyaztech/sitemap-generator
Package sitemap-generator
Short Description The PHP Sitemap Generator is a versatile and easy-to-use tool that empowers developers to effortlessly create sitemaps for their websites. With support for various sitemap formats, including XML, ROR, HTML, and URLLIST, this library simplifies the process of generating essential files to enhance search engine optimization (SEO) and ensure efficient indexing of web content.
License MIT
Informations about the package sitemap-generator
PHP Sitemap Generator
Description:
The PHP Sitemap Generator is a versatile and easy-to-use tool that empowers developers to effortlessly create sitemaps for their websites. With support for various sitemap formats, including XML, ROR, HTML, and URLLIST, this library simplifies the process of generating essential files to enhance search engine optimization (SEO) and ensure efficient indexing of web content.
Key Features:
- XML Sitemaps: Generate standard XML sitemaps to facilitate search engine discovery of your website's URLs.
- ROR Sitemaps: Create ROR (Resources of a Resource) XML files, providing additional metadata about your content.
- HTML Sitemaps: Generate HTML sitemaps for human-readable navigation, enhancing user experience and site accessibility.
- URL List: Produce URLLIST files, a plain-text list of URLs, suitable for various applications and indexing purposes.
Requirements:
- PHP 7.4 or higher
- Composer for dependency management
- Write permissions for the output directory
Usage:
Installation:
Constructor Parameters:
The SitemapGenerator class constructor accepts four optional parameters:
-
$changeFrequency(string): Specifies how frequently the content at the URLs is likely to change. Default isChangeFrequency::DAILY. Available options are:ChangeFrequency::DAILYChangeFrequency::WEEKLYChangeFrequency::MONTHLYChangeFrequency::YEARLY
$domain(string): The domain for which the sitemap is being generated. If not provided, it defaults to the current domain (orlocalhostif unavailable).
Example Usage:
Method Details:
-
saveToSitemap(string $filePath = '.')
Generates an XML sitemap and saves it to the specified directory. The sitemap includes:- URLs collected from the domain.
- Last modified date (default: current date).
- Change frequency (e.g., daily, weekly).
- Priority (default: 0.8).
-
saveToRor(string $filePath = '.')
Generates a ROR (RSS-based) sitemap and saves it to the specified directory. The ROR sitemap includes:- URLs collected from the domain.
- Metadata such as title and description extracted from the URLs.
-
saveToHtmlSitemap(string $filePath = '.')
Generates a human-readable HTML sitemap and saves it to the specified directory. The HTML sitemap includes:- A list of URLs with clickable links.
- The total number of pages.
- The last updated date.
saveToUrlList(string $filePath = '.')
Generates a plain-text file containing a list of URLs and saves it to the specified directory. Each URL is listed on a new line.
License:
This project is released under the MIT License, offering flexibility and ease of use for developers while requiring proper attribution.
Contributing:
Contributions and feedback are welcome! To contribute:
- Fork the repository on GitHub.
- Create a new branch for your feature or bugfix.
- Make your changes and ensure the code adheres to the project's coding standards.
- Write tests for your changes, if applicable.
- Submit a pull request with a clear description of your changes.
For major changes, please open an issue first to discuss your ideas.
Links:
Begin enhancing your website's discoverability and SEO with the PHP Sitemap Generator today!
Author:
- Fayyaztech
- Email: [email protected]
All versions of sitemap-generator with dependencies
ext-dom Version *
ext-simplexml Version *