Esempio n. 1
0
 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);
     $images = $itemhtml->find("div[class=cover-container] img[0]")[0]->src;
     $find_list_img = $itemhtml->find("img[class=screenshot]");
     // Check title
     $check_alias = $lib->check_com($id_com);
     if ($check_alias == 0) {
         for ($j = 0; $j < count($find_list_img); $j++) {
             $item_img = $find_list_img[$j]->src;
         }
         $version = $itemhtml->find('div[class=meta-info] div[itemprop="softwareVersion"]')[0]->plaintext;
         $manufacture = $itemhtml->find('a[class="document-subtitle primary"] span')[0]->plaintext;
         $post_meta['_infomation_name'] = $title;
         $post_meta['_infomation_version'] = $version;
         $post_meta['_infomation_manufacturers'] = $manufacture;
         $post_meta['snap_isAutoPosted'] = 1;
         $post_meta['_internal_link_exist'] = "yes";
         // Lay thong tin bai viet
         $content_ = $itemhtml->find("div[class=show-more-content]");
         $content .= $content_[0]->innertext;
         if ($images != "") {