Пример #1
0
 * -Crawls a website,
 * -Saves data to database
 * -Saves Page title, URL, Body text, and depth level
 * @author Robert Parham <adelphia at protonmail dot ch>
 * @license Apache 2.0 Lic.
 */
// ini_set('memory_limit','300M');
/*******************************************************************************
 * This is an extremely basic sample search page used to search the crawler results
 ******************************************************************************/
################################################################################
############################## AJAX STUFF ######################################
################################################################################
if (isset($_POST['action']) && $_POST['action'] == "search") {
    require realpath(dirname(__FILE__)) . "/crawler/autoload.php";
    $return = CrawlerPDO::doSearch($_POST['term']);
    echo json_encode($return);
    exit;
}
################################################################################
############################## END AJAX STUFF ##################################
################################################################################
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        
        <!-- metas -->
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">