Beispiel #1
0
<?php

define('IN_ADMINCP', TRUE);
define('NOROBOT', TRUE);
require_once './include/common.inc.php';
$url = 'http://us.tiandaoedu.com/vi/immigration/607303.html';
$title = '/<divclass="wzlistofh"><pclass="wztityh">(.*?)<\\/p>/';
$content = '/<divclass="wzy_bot">(.*?)<\\/div>/';
$data = getTitleContentByUrl($title, $content, $url, 'gbk');
print_r($data);
die;
$hrefs = getAllHref($url, $keyword);
$hrefs = getHrefByType($hrefs);
$hrefs = $hrefs['html'];
echo '<pre>';
//print_r($hrefs);
foreach ($hrefs as $href) {
    echo $href;
    /* 	if(!MyDomIsList($href)){
    		$data = getTitleContentByUrl($title,$content,$href);
    		print_r($data);
    	} */
}
echo '</pre>';
//print_r($data);
Beispiel #2
0
<?php

define('IN_ADMINCP', TRUE);
define('NOROBOT', TRUE);
require_once './include/common.inc.php';
$sql = "SELECT * FROM col_contentrule where rid = 4";
$query = $db->query($sql);
$data = $db->fetch_assoc($query);
$hrefs = getAllHref($data['listurl'], $data['keyword']);
$hrefs = getHrefByType($hrefs);
//var_dump($hrefs);
foreach ($hrefs['html'] as $href) {
    if (!MyDomIsList($href)) {
        echo $href;
        echo '<br>';
        $da = getTitleContentByUrl($data['title'], $data['content'], $href, $data['charset']);
        print_r($da);
    }
}