Show HN: I created a search engine
sturtz.cf
sturtz.cf
if (mbsubstr($element->href, 0, 2) == "//") {
$element->href = $urlparts['scheme'].":".$element->href;
}
if (mbsubstr($element->href, 0, 1) == "/") {
$element->href = $base_url.$element->href;
}
if (mbsubstr($element->href, 0, 2) == "./") {
$element->href = substr($element->href, 2);
}
if (mbsubstr($element->href, 0, 5) != "http:"
&& mbsubstr($element->href, 0, 6) != "https:"
) {
$element->href = $base_url.$url_path.$element->href;
}
which looks for the href tag and will send the spider there to crawl it
then it puts it into the database by some INSERT SQL commands: (https://git.sturtz.cf/Sturtz_Network/sturtz-search-public/sr...)if ($md5sum == '') { $stmt = $db->prepare( "INSERT INTO `".$mysql_table_prefix ."links` (site_id, url, title, description, fulltxt, " ."indexdate, size, md5sum, level) VALUES ( ? , ? , ? ," ." ? , ? , CURDATE(), ? , ? , ? )" ); You can find a working version at https://sturtz.cf