# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
spl_autoload_register();
require 'st/y/function/error_handler.php';
require 'localhost/onion_search/const.php';
set_error_handler('\\st\\y\\error_handler');
// We need to send the correct Content-Type header.
header('Content-Type: application/xhtml+xml');
// These two constants are easier to use in strings if they are variables.
$nocrawl = \localhost\onion_search\ONIONSEARCH_NOCRAWL;
$tocrawl = \localhost\onion_search\ONIONSEARCH_TOCRAWL;
$useragent = htmlspecialchars(\localhost\onion_search\REMOTE_USERAGENT,
ENT_QUOTES|ENT_SUBSTITUTE|ENT_DISALLOWED|ENT_XML1,
'UTF-8', true);
// The database reading/writing object
$MySQLi = new mysqli(
\localhost\onion_search\MYSQLI_HOST,
\localhost\onion_search\MYSQLI_USERNAME,
\localhost\onion_search\MYSQLI_PASSWORD,
\localhost\onion_search\MYSQLI_DATABASE,
\localhost\onion_search\MYSQLI_PORT,
\localhost\onion_search\MYSQLI_SOCKET
); ?>
Onions found by
Onions found by
query("SELECT `uri`, `title` FROM `$tocrawl` ORDER BY `uri`");
foreach($result as $onion):
$title = htmlspecialchars($onion['title'],
ENT_QUOTES|ENT_SUBSTITUTE|ENT_DISALLOWED|ENT_XML1,
'UTF-8', true);
echo "- $title
\n";
endforeach;
?>
query("SELECT `uri` FROM `$nocrawl` ORDER BY `uri`");
foreach($result as $onion):
$title = htmlspecialchars($onion['uri'],
ENT_QUOTES|ENT_SUBSTITUTE|ENT_DISALLOWED|ENT_XML1,
'UTF-8', true);
echo "- $title
\n";
endforeach;
?>
Copyright © 2015 y.st.; You may modify and/or redistribute this document under the terms of the GNU AGPLv3+.