Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
wget -r -l 0 http://example.org/
<?php
header('Content-type: text/plain; charset=utf-8');
class FileFilterIterator extends FilterIterator
{
public function accept()
{
$fileInfo = parent::current();
// Nur Dateien
if (!$fileInfo->isFile()) {
return false;
}
return true;
}
}
$path = '/home/marc/wget-test';
$pattern = '#http(?:s?)://[^\'"\s]+#i';
$iterator = new FileFilterIterator(
new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($path)));
$final = array();
foreach ($iterator as $file) {
$data = file_get_contents($file);
$test = preg_match_all($pattern, $data, $matches);
// Doppelte Einträge vermeiden
foreach($matches[0] as $match) {
if (!in_array($match, $final)) {
$final[] = $match;
}
}
}
foreach ($final as $url) {
echo $url . "\n";
}