PHP Classes

File: demo/example.php

Recommend this page to a friend!
  Classes of Joćo Ribeiro   PHP URL Extractor   demo/example.php   Download  
File: demo/example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP URL Extractor
Extract URLs of images and metadata from Web pages
Author: By
Last change: Changed folder stucture. Updated composer autoload to psr-4
Updated class namespace and created a composer.json file.
Date: 8 years ago
Size: 758 bytes
 

Contents

Class file image Download
<?php

require_once '../src/UrlExtractor/UrlExtractor.php';

$urlExtractor = new \rollbackpt\UrlExtractor\UrlExtractor();
$metaTags = $urlExtractor->extractAll("https://github.com/rollbackpt", false);
echo
"<h2>Meta tags from -> https://github.com/rollbackpt</h2>";
echo
"<pre>";
var_dump($metaTags);
echo
"</pre>";

// Or using composer autoload...
// Install using: composer require rollbackpt/url-extractor

// require __DIR__ . "/../vendor/autoload.php";
//
// use rollbackpt\UrlExtractor\UrlExtractor;
//
// $urlExtractor = new UrlExtractor();
// $metaTags = $urlExtractor->extractAll("https://github.com/rollbackpt", false);
// echo "<h2>Meta tags from -> https://github.com/rollbackpt</h2>";
// echo "<pre>";
// var_dump($metaTags);
// echo "</pre>";