diversen/get-meta-tags

Getting title and meta tags from external website using curl and DOM

v1.0.2 2016-11-06 10:23 UTC

This package is auto-updated.

Last update: 2024-10-20 08:29:57 UTC


README

PHP composer package for getting title and meta-tags Get meta tags using curl and DOM

Install

composer require diversen/get-meta-tags

Usage:

// include_once "../../vendor/autoload.php";
use diversen\meta;

$m = new meta();

// Simple usage, get's title, description, and keywords by default
$ary = $m->getMeta('https://github.com/diversen/get-meta-tags');
print_r($ary);

// With more params
$ary = $m->getMeta('https://github.com/diversen/get-meta-tags', array ('description' ,'keywords'), $timeout = 10);
print_r($ary);

License

MIT © Dennis Iversen