<?php require_once 'Scraper.php'; require_once 'View.php'; session_start(); error_reporting(E_ALL); ini_set('display_errors', 'Off'); echo "<pre>"; $view = new View(); $scraper = new Scraper($view); $view->start(); echo "</pre>";
<?php include_once './lib/lib.php'; View::start("Prueba"); //Util::showForm(); echo ' <div id=general>'; echo ' <div id=head>'; View::cabecera(); echo '</div> '; echo ' <div id=bar>'; View::superiorBar(); echo '</div> '; echo ' <div id=nav-bar>'; View::lateralBar(); echo '</div> '; echo ' <div id=footer> </div> '; echo ' </div>'; View::end();
<?php include_once './resources/lib.php'; include_once './resources/HtmlDoc.php'; include_once './resources/WordDoc.php'; View::start("Etnonautas"); $url = 'http://orienta.hol.es/pruebas/'; //$HTMLPage = strip_tags(file_get_contents($url)); $HTMLPage = file_get_contents($url); //$HTMLPage = 'en esta http://stringer.com ha de href=http://stringer.com buscar stringer, >'; if (preg_match_all('/<a[^>]*href="([^"]*)"[^>]*>.*<\\/a>/', $HTMLPage, $coincidencias, PREG_OFFSET_CAPTURE)) { //if(preg_match_all("#(?<=href=)[\'|\"]?.*[\'|\"]?#", $HTMLPage, $coincidencias, PREG_OFFSET_CAPTURE)){ echo 'se han encontrado ' . sizeof($coincidencias[0]) . ' coincidencias : '; print_r($coincidencias); } else { echo 'Pues nada...'; } Util::toTxt($HTMLPage); //echo str_word_count($HTMLPage); //echo $HTMLPage; /* $wordNumber = (new HtmlDoc($url))->getWordCount(); echo $wordNumber; */ View::end();