$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); //$data_content = _curl($url); $html = str_get_html($data_content); $items = $html->find("div[class=details] h2 a[class=title]"); for ($i = 0; $i < 5; $i++) { $content = ''; $item = $items[$i]; //$title = $item->plaintext; //$slug = vnit_change_title($title); $link = $item->href; $link = strpos($link, 'https://') !== false ? $link : 'https://play.google.com' . $link; $id_com = getCom($link); $itemdatas = _curl($link); $itemhtml = str_get_html($itemdatas); $title = $itemhtml->find("div[class=document-title]")[0]->plaintext; $slug = vnit_change_title($title);
die; $lib = new lib(); $total_no_active = $lib->get_num_link_no_active(); $total_active = $lib->get_num_link_active(); $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; echo '<meta charset="UTF-8">'; //$url = 'https://play.google.com/store/apps/category/GAME_ADVENTURE/collection/topselling_free'; //$data_content = _curl($url); $url = 'https://play.google.com/store/apps/category/GAME_STRATEGY/collection/topselling_free?authuser=0'; $data_content = postPage($url, $post); $html = str_get_html($data_content); $items = $html->find("div[class=details] h2 a[class=title]"); for ($i = 0; $i < 2; $i++) { $content = ''; $item = $items[$i]; $title = $item->plaintext; $link = $item->href; $link = strpos($link, 'https://') !== false ? $link : 'https://play.google.com' . $link; echo '<div>Title: ' . $title . '</div>'; echo '<div>Link: ' . $link . '</div>'; $itemdatas = _curl($link); $itemhtml = str_get_html($itemdatas); // Hinh anh $root_year = ROOT . '../../wp-content/uploads/' . date("Y") . '/'; if (!is_dir($root_year)) {