{"id":37233437,"url":"https://github.com/adambinnersley/sitemap","last_synced_at":"2026-02-21T23:16:43.272Z","repository":{"id":56940395,"uuid":"90957308","full_name":"adambinnersley/sitemap","owner":"adambinnersley","description":"Generate a XML sitemap for a given URL. This class crawls any given website to create an XML sitemap for the domain.","archived":false,"fork":false,"pushed_at":"2020-12-02T17:04:03.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-16T01:06:59.730Z","etag":null,"topics":["sitemap","sitemap-builder","sitemap-generator","sitemap-php","sitemapper","xml-sitemap"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adambinnersley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-11T08:41:54.000Z","updated_at":"2020-12-02T16:24:41.000Z","dependencies_parsed_at":"2022-08-21T01:40:24.036Z","dependency_job_id":null,"html_url":"https://github.com/adambinnersley/sitemap","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/adambinnersley/sitemap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adambinnersley%2Fsitemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adambinnersley%2Fsitemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adambinnersley%2Fsitemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adambinnersley%2Fsitemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adambinnersley","download_url":"https://codeload.github.com/adambinnersley/sitemap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adambinnersley%2Fsitemap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29697476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T18:18:25.093Z","status":"ssl_error","status_checked_at":"2026-02-21T18:18:22.435Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sitemap","sitemap-builder","sitemap-generator","sitemap-php","sitemapper","xml-sitemap"],"created_at":"2026-01-15T03:54:06.559Z","updated_at":"2026-02-21T23:16:43.249Z","avatar_url":"https://github.com/adambinnersley.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP XML Sitemap Generator\nGenerate a XML sitemap for a given URL. This class crawls any given website to create an XML sitemap for the domain.\n\n## Installation\n\nInstallation is available via [Composer/Packagist](https://packagist.org/packages/adamb/database), you can add the following line to your `composer.json` file:\n\n```json\n\"adamb/sitemap\": \"^1.0\"\n```\n\nor\n\n```sh\ncomposer require adamb/sitemap\n```\n\n## Usage\n\nExample of usage can be found below:\n\n```php\n\n// Method 1\n$sitemap = new Sitemap\\Sitemap('http://www.yourwebsite.co.uk');\n$sitemap-\u003ecreateSitemap(); // Returns true if sitemap created else will return false\n\n\n// Method 2\n$sitemap = new Sitemap\\Sitemap();\n$sitemap-\u003esetDomain('http://www.yourwebsite.co.uk');\n$sitemap-\u003ecreateSitemap(); // Returns true if sitemap created else will return false\n\n```\n\n## Change file creation location\n\nBy default the sitemap.xml file is created in the document root but this can be altered using the following method.\n\n```php\n\n$sitemap = new Sitemap\\Sitemap('http://www.yourwebsite.co.uk');\n\n// This should be an absolute path\n$sitemap-\u003esetFilePath($_SERVER['DOCUMENT_ROOT'].'sitemaps/');\n\n// or\n\n$sitemap-\u003esetFilePath('C:\\Inetpub\\mywebsite.co.uk\\httpdocs\\sitemaps\\\\');\n\n$sitemap-\u003ecreateSitemap();\n\n```\n\n## Sitemap creation options\n\nBy default the sitemap creates a XSL stylesheet along with the sitemap. You can also change the level of the link to include in the sitemap (e.g. Only include links within 3 clicks of the homepage) and also change the filename of the sitemap on creation.\n\n```php\n\n// To not include the XSL stylesheet set the first value to false when calling createSitemap();\n$sitemap-\u003ecreateSitemap(false);\n\n// To only include links within 3 click set the second value to 3\n$sitemap-\u003ecreateSitemap(true, 3);\n\n// To change the filename set the third value to your filename (excluding extension)\n$sitemap-\u003ecreateSitemap(true, 5, 'mysitemapfile');\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadambinnersley%2Fsitemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadambinnersley%2Fsitemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadambinnersley%2Fsitemap/lists"}