-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcrawler.php
More file actions
executable file
·27 lines (26 loc) · 913 Bytes
/
crawler.php
File metadata and controls
executable file
·27 lines (26 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<html>
<head>
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
<script src="crawler.js"></script>
</head>
<body>
<div id="imported-content"></div>
</body>
<div id="file-collection">
<?php
// === LOCAL HTML FILES ============================================
// $filedir = 'site-pages';
// $files = scandir($filedir);
// foreach ($files as $key=>$file) {
// if (substr($file, -5) === '.html') {
// echo '<div class="file" id="http://localhost/devon/labs/crawler/' . $filedir . '/' . rawurlencode($file) . '"></div>';
// }
// }
// === EXTERNAL URLS ===============================================
$contents = file('site-urls/to-crawl.txt');
foreach($contents as $line) {
echo '<div class="file" id="' . trim($line) . '"></div>';
}
?>
</div>
</html>