migliori/sitemap-crawler
Composer 安装命令:
composer require migliori/sitemap-crawler
包简介
Sitemap crawler/generator. For the given URL it will return sitemap XML file with URLs and images.
关键字:
README 文档
README
Sitemap crawler/generator. For the given URL it will return sitemap XML file with URLs and images.
Can be used as Standalone or with Ajax (build sitemap, submit to Search Engines & show results on a button click)
Original project: https://github.com/ivebe/sitemap-crawler
Install
composer require migliori/sitemap-crawler
Features
- crawl given URL and generate sitemap
- crawl each found URL and add images to the sitemap
- save the sitemap on your server or download it
- configure the maximum deph
- use as standalone (or CRON task)
- call with ajax on button click
- onscreen live report with urls count and urls list
- search engines auto-submission (ping) with onscreen report
Example
<?php require_once __DIR__ . '/vendor/autoload.php'; use SitemapCrawler\Crawler; use SitemapCrawler\SitemapService; use SitemapCrawler\LinkCollection; $config = require __DIR__ . '/vendor/ivebe/sitemap-crawler/src/config.php'; $url = 'http://www.google.com'; /** * $dest: * false if you want to download the generated sitemap * 'filename.xml' to save file on server */ $dest = __DIR__ . '/sitemap.xml'; /** * sitemap url for search engines submission */ $sitemap_url = 'http://www.google.com/sitemap.xml'; $crawler = new Crawler($config['crawler']); $collection = new LinkCollection(); $provider = new SitemapService($crawler, $collection, $url, $config['sitemap_service']); $links = $provider->crawl($url); $provider->export('daily', $dest); if ($config['submit_to_search_engines'] === true) { $provider->SubmitSiteMap($sitemap_url); }
Example 2 (Ajax)
Refer to ajax-demo.php
migliori/sitemap-crawler 适用场景与选型建议
migliori/sitemap-crawler 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.64k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2019 年 04 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「generator」 「Sitemap」 「ajax」 「crawler」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 migliori/sitemap-crawler 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 migliori/sitemap-crawler 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 migliori/sitemap-crawler 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Memio's PrettyPrinter, used to generate PHP code from given Model
Symfony sitemap generator
PHP Simple Sitemap Generator
Selenium4 (WebDriver) driver for Mink framework
Interfaces for web resource models and services to retrieve and create them
laravel middleware to allow ajax only calls
统计信息
- 总下载量: 3.64k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-04-10