ordinary9843 / meta-master
Analyzing and crawling the meta tags of a static website
Installs: 10 769
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >7.1
- guzzlehttp/guzzle: ^6.5
Requires (Dev)
- phpunit/phpunit: >7.0
This package is auto-updated.
Last update: 2023-05-08 10:44:26 UTC
README
Intro
Analyzing and crawling the meta tags of a static website.
Requirements
This library has the following requirements:
- PHP 7.1+
Installation
Require the package via composer:
composer require ordinary9843/meta-master
Usage
Example usage:
<?php require './vendor/autoload.php'; use Ordinary9843\MetaMaster; $metaMaster = new MetaMaster(); /** * Set connection time (in seconds). */ $metaMaster->setConnectTimeout(5); $metaMaster->setTimeout(5); /** * Analyzing the meta tags from website. * * Output: [ * 'title' => '', * 'charset' => '', * 'keywords' => '', * 'description' => '', * 'viewport' => '', * 'author' => '', * 'copyright' => '', * 'robots' => '', * 'og' => [], * 'twitter' => [] * ] */ $metaMaster->parse('https://github.com/ordinary9843'); /** * Get error message. * * Output: [ * '[INFO] Message ...', * '[ERROR] Message ...' * ] */ $metaMaster->getError();
Testing
composer test
Licenses
(The MIT License)
Copyright © Jerry Chen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE