Exemplo n.º 1
0
$ar_cat = $lib->ar_cat_string($catid);
$total_no_active1 = $lib->get_num_link_no_active($ar_cat);
$total_no_active = $total_no_active1;
$total_active = $lib->get_num_link_active($ar_cat);
$total_link = $total_active + $total_no_active;
$phantram = round($total_active * 100 / $total_link, 1);
$_SESSION['total'] = $total_link;
$_SESSION['da_thuc_hien'] = $total_active;
$_SESSION['chua_thuc_hien'] = $total_no_active;
$_SESSION['con_lai'] = $total_link - $total_active;
$_SESSION['phan_tram'] = $phantram;
$data['chua_thuc_hien'] = $total_no_active;
$data['phantram'] = $phantram;
$random = rand(20, 1000);
if ($total_no_active1 == 0) {
    $lib->ac_active();
} else {
    $row = $lib->get_row($ar_cat);
    //die($row->link_google);
    //var_dump($row);
    //$url = $row->link_google;
    $post_google["start"] = $random;
    $post_google["num"] = 5;
    $post_google["numChildren"] = 0;
    $post_google["ipf"] = 1;
    $post_google["xhr"] = 1;
    //$post["token"] = "3GOZfa2gaq0e6Fga54trwHTzeXQ:1428335379649";
    $url = $row->link_google . '?authuser=0';
    //$data['url'] = $url;
    $data['ids'] = $row->ids;
    $data_content = postPage($url, $post_google);