<?php define('ROOT', '../'); //define('HOST','localhost'); //define('USER','root'); //define('PASS','admin'); //define('DBNAME','2015_etc'); define('HOST', 'localhost'); define('USER', 'root'); define('PASS', ''); define('DBNAME', 'admin_masterapk'); //require_once( ROOT.'../wp-admin/admin.php' ); include "inc/db.php"; include "inc/lib.php"; include "inc/simple_html_dom.php"; include "inc/function_string.php"; $db = new db(); $sql = "SELECT ID, file FROM wp_posts as p, wp_downloads as d WHERE p.ID = d.post_id ORDER BY ID DESC"; $list = $db->result($sql); foreach ($list as $rs) { $id_com = getCom($rs->file); $vdata['id_com'] = $id_com; $db->update("wp_posts", $vdata, array("ID" => $rs->ID)); unset($vdata); }
//$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); $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;