定制 webignition/website-sitemap-finder 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webignition/website-sitemap-finder

Composer 安装命令:

composer require webignition/website-sitemap-finder

包简介

Finds the sitemap(.xml) for a given website

关键字:

README 文档

README

Overview

Find the URLs for sitemaps for a given site. URLs are extracted from robots.txt. If none are present, sitemap.xml and sitemap.txt are assumed.

Usage

The "Hello World" example

<?php
use webignition\WebsiteSitemapFinder\Configuration;
use webignition\WebsiteSitemapFinder\WebsiteSitemapFinder;

$configuration = new Configuration([
    Configuration::KEY_ROOT_URL => 'http://google.com/',
]);

$finder = new WebsiteSitemapFinder($configuration);        
$sitemapUrls = $finder->findSitemapUrls();

$this->assertEquals($sitemapUrls, [
    'http://www.gstatic.com/culturalinstitute/sitemaps/www_google_com_culturalinstitute/sitemap-index.xml',
    'http://www.gstatic.com/s2/sitemaps/profiles-sitemap.xml',
    'https://www.google.com/sitemap.xml',
]);

Building

Using as a library in a project

If used as a dependency by another project, update that project's composer.json and update your dependencies.

"require": {
    "webignition/website-sitemap-finder": "*"      
}

Developing

This project has external dependencies managed with composer. Get and install this first.

# Make a suitable project directory
mkdir ~/website-sitemap-finder && cd ~/website-sitemap-finder

# Clone repository
git clone git@github.com:webignition/website-sitemap-finder.git.

# Retrieve/update dependencies
composer.phar install

Testing

Have look at the project on travis for the latest build status, or give the tests a go yourself.

cd ~/website-sitemap-finder
composer.phar test

统计信息

  • 总下载量: 5.58k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-07-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固