PHP Classes

File: views/crawl.php

Recommend this page to a friend!
  Classes of Hillary Kollan   Scopr   views/crawl.php   Download  
File: views/crawl.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Scopr
Crawl and search Web site pages, images and news
Author: By
Last change:
Date: 1 year ago
Size: 569 bytes
 

Contents

Class file image Download
<?php
require_once __DIR__."/../config.php";
require_once
SITE_ROOT. "/controllers/SearchController.php";
$search = new SearchController();
$src = "https://edition.cnn.com/";
$links = $search->followLinks($src, $src);
$crawledLinks = $search->returnCrawledLinks();
//$titles = $search->followTitleLinks($src);
//$images = $search->followImageLinks($src);


array_shift($crawledLinks);
foreach(
$crawledLinks as $site){
   
$links = $search->followLinks($site, $src);
   
//$titles = $search->followTitleLinks($site);
    //$images = $search->followImageLinks($site);
}