<?php
$sites = array(
'http://www.najdi.si' => array(
'index.jsp' => array(
'beseda1', 'beseda2', 'beseda3 ki mora biti na tej strani'
),
'tretjaStran.html'
),
'test.com' => array(
'enastran.php', // klele moraš še te besede noter dat pr vsakmu pagu
'drugastran.php')); // klele moraš še te besede noter dat pr vsakmu pagu
foreach($sites as $site => $pages) {
foreach($pages as $page => $pageKeywords) {
$pageContent = @filegetcontents($site . '/' . $page);
// Site was not found, continue with next site
if ($pageContent === false) {
echo "$site/$page ni moč odpreti<br/>";
continue;
}
// Site was found, check keywords on this pages
foreach($pageKeywords as $keyword) {
if (strpos($pageContent, $keyword) === false) {
echo "{$keyword} was not found on $site/$page <br/>";
}
}
}
}
?>