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: 6 years ago
Size: 758 bytes


Class file image Download

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

$urlExtractor = new \rollbackpt\UrlExtractor\UrlExtractor();
$metaTags = $urlExtractor->extractAll("", false);
"<h2>Meta tags from -></h2>";

// 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("", false);
// echo "<h2>Meta tags from -></h2>";
// echo "<pre>";
// var_dump($metaTags);
// echo "</pre>";

For more information send a message to info at phpclasses dot org.