nonz250 / php-simple-ogp
This is a simple library for reading OGP.
Installs: 5 688
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^7.4|^8.0
Requires (Dev)
- ext-dom: *
- ext-mbstring: *
- phpunit/phpunit: ^9.5
README
simple ogp maker
Contributing
Feel free to submit a Pull Request. However, please run the make prod
command and check the test content before submitting your Pull Request.
Development
We recommend using Docker for this project.
Make Commands
Initial Setup
make setup
Development Test
Testing under development.
make test
Code Fixer
make fix
Production Test
Test before you Pull Request.
make prod
How to use
For Example.
$ogp = new \SimpleOgp\SimpleOgp('https://labo.nozomi.bike'); // Get web site content and set ogp values. $ogp->getHtml(); // Get ogp title. $title = $ogp->title(); // Get ogp description. $description = $ogp->description(); // Get ogp image path. $imagePath = $ogp->imagePath();