hamburgscleanest/laravel-fetch-site-details

Fetch details from other websites, like title, description, language, keywords, ...

v1.0.0 2018-04-05 22:40 UTC

This package is auto-updated.

Last update: 2024-03-29 03:32:24 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Just a small package to fetch details from other websites, like title, description, language, keywords, ...

Install

Via Composer

$ composer require hamburgscleanest/laravel-fetch-site-details

Automatic Package Discovery

Everything is automatically registered for you.

Usage

/** @var hamburgscleanest\LaravelFetchSiteDetails\Models\Site $website */
$website = LaravelSiteDetails::fetch('https://www.reddit.com/');

The following information is available:

The title of the website.

echo $website->title; // 'reddit: the front page of the internet'

The website's description.

echo $website->description; // 'reddit: the front page of the internet'

Meta keywords that were defined for the website.

echo $website->keywords; // ['reddit', 'reddit.com', 'vote', 'comment', 'submit']

The language of the website.

echo $website->language; // 'en'

Changes

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email chroma91@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.