<?php   
//ini_set('display_errors', 'on');   
$language		= $opt_themes['apk_language'];  
$language2		= get_option('wp_apk_langs'); 
$gplay			= new \Nelexa\GPlay\GPlayApps( $defaultLocale = $language, $defaultCountry = '' ); 
$appinfo		= $gplay->getAppInfo( $titleId );

$arr['getUrl']	= $appinfo->getUrl();
$arr['apkIds']	= $appinfo->getId();
$arr['name']	= $appinfo->getName(); 
$ukuran_bg	= '=w868';	
$arr['cover']	= $appinfo->getCover()->getUrl(); 
$arr['summary']	= $appinfo->getSummary();
$arr['appversion']	= $appinfo->getAppVersion();
$arr['description']	= $appinfo->getDescription();

if($appinfo->getCategory()){

$parent_categoryx	= $appinfo->getCategory()->getId();
//$parent_categoryx	= $scraper->match('/(.*?)/ms', $parent_categoryx, 1); 
//$parent_category	= ucwords($parent_categoryx); 
$arr['parent_category']	= ucwords($parent_categoryx); 

if (!empty($parent_categoryx) && strpos($parent_categoryx, 'GAME_') !== false) {
	$arr['p_category'] = 'Games'; 
} else {
	$arr['p_category'] = 'Apps'; 
} 
 
  

$child_category		= $appinfo->getCategory()->getName();
$arr['category']	= $appinfo->getCategory()->getName();

//$arr['category']	= $appinfo->getCategory()->getName();
} 

$arr['developer']	= $appinfo->getDeveloperName();
$arr['installs']	= $appinfo->getInstallsText();
$arr['android']	= $appinfo->getAndroidVersion();
$arr['numberrates']	= number_format($appinfo->getScore(), 1);
$arr['numbervoters']	= $appinfo->getNumberVoters();
$arr['recentchanges']	= $appinfo->getRecentChanges();
//$arr['size']	= $appinfo->getSize();
$arr['getsize']	= $appinfo->getSize();
$arr['getcontentrating']	= $appinfo->getContentRating();
$arr['geticon']	= $appinfo->getIcon()->getUrl();
$arr['getpricetext']	= $appinfo->getPriceText();
$arr['isfree']	= $appinfo->isFree();
$arr['youtube']	= $appinfo->getVideo(); 
$arr['getUpdated']	= '';
//$arr['getUpdated']	= $appinfo->getUpdated()->format('M d, Y'); 
$arr['getScreenshots']	= $appinfo->getScreenshots();
//print_r($appinfo->getUpdated()->format('M d, Y'));
