Esempio n. 1
0
function add_links_insite_fromtemp($in_url)
{
    global $db;
    $domain = getdomain($in_url);
    $query = $db->query("select * from ve123_links_temp where url like '%" . $domain . "%' and  updatetime<='" . (time() - 86400 * 30) . "'");
    while ($row = $db->fetch_array($query)) {
        @$db->query("update ve123_links_temp set updatetime='" . time() . "' where url='" . $row["url"] . "'");
        add_links_insite($row["url"]);
        sleep(3);
    }
    sleep(5);
    add_links_insite_fromtemp($in_url);
}
Esempio n. 2
0
function add_in_site_link($url)
{
    echo "正在处理中...<br>";
    print str_repeat(" ", 4096);
    ob_flush();
    flush();
    sleep(1);
    global $db;
    $site = $db->get_one("select * from ve123_sites where url='" . $url . "'");
    if ($site["spider_depth"] == 0) {
        Update_link($url);
        echo "更新完成";
    } elseif ($site["spider_depth"] == 1) {
        add_links_insite($url);
        //echo $site["spider_depth"];
    } else {
        add_links_insite($url);
        add_links_insite_fromtemp($url);
    }
}