Download the PHP package jclyons52/page-preview without Composer
On this page you can find all versions of the php package jclyons52/page-preview. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jclyons52/page-preview
More information about jclyons52/page-preview
Files in jclyons52/page-preview
Package page-preview
Short Description get info about page links and generate preview images
License MIT
Homepage https://github.com/jclyons52/page-preview
Informations about the package page-preview
page-preview
Creates link previews to pages with thumbnail, title and description
Install
Via Composer
Usage
or do it inline:
Use another one of the other default templates:
define your own templates:
caching
Http calls are slow, so to speed up your response times you may want to cache your previews. This package can take any psr-6 compliant cache driver as a parameter.
The data available for you templates will be:
- string $title - meta title or page title if not found in meta
- string $description - meta description
- string $url - link url
- array $images - array of image urls
- array $meta - array of meta values with their names as keys
If you're usign information from tags such as the twitter meta tags (or anything seperated with ':') you may want to use the unFlatten function to get a multi level array.
This meta:
using unFlatten:
Would produce the following array:
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
Contributing
Please see CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Joseph Lyons
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of page-preview with dependencies
jclyons52/php-query Version ^1.0@dev
league/plates Version ^3.1
psr/cache Version ~1.0