searpl

a small php sqlite search engine. <a href="https://thunix.net/~xfnw/search">see it in action</a>
Log | Files | Refs | README

commit 459c295488193a9fb3b230e441c87e18b37ac973
parent 3fdad57505a47c7d1670fdf2591aa888dca97011
Author: xfnw <xfnw@thunix.net>
Date:   Fri,  8 Jan 2021 16:54:16 -0500

better crawl.php logging

Diffstat:
Mcrawl.php | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/crawl.php b/crawl.php @@ -28,14 +28,19 @@ $arg = $argv; array_shift($arg); foreach ($arg as $url) { + echo "\n\n"; $url = preg_replace('/\/$/','',$url); + echo $url."\n"; $file = file_get_contents($url); if (!$file) continue; $title = page_title($file); $document = preg_replace('/[ \t]+/', ' ', preg_replace('/[\r\n]+/', "", strip_tags($file))); - if (!$title || !$document) + if (!$title || !$document) { + echo "no title!\n"; continue; + } + echo $title; echo $document;