re-crawl sites

This commit is contained in:
xfnw 2020-12-22 10:13:45 -05:00
parent 8fa66770b1
commit 036e3addb2
2 changed files with 4 additions and 2 deletions

View file

@ -38,6 +38,10 @@ foreach ($arg as $url) {
continue;
echo $title;
echo $document;
$stmt = $db->prepare('DELETE FROM indexed WHERE url = ?');
$stmt->execute([$url]);
$stmt = $db->prepare('INSERT INTO indexed (title, url, content) VALUES (?, ?, ?)');
$stmt->execute([$title, $url, $document]);
}

View file

@ -64,8 +64,6 @@ if (isset($_GET['q']) && preg_replace('/\s+/', '', $_GET['q']) != '') {
$results = false;
foreach ($rows as $row) {
$results = true;
if (substr($row['url'],-1,1)=='/')
continue
?>
<div class='box'>