= 2) { // Get the last two parts of the host (e.g., "example.com") $domain = $hostParts[$numParts - 2] . '.' . $hostParts[$numParts - 1]; return $domain; } else { // If the host doesn't have at least two parts, return the entire host return $host; } } else { // If 'HTTP_HOST' is not set, return false return false; } } ?> vimarsana; $newsdb = $db->news2021; $detect = new Mobile_Detect; $key = $_GET['country']; $key = str_replace("https:/","https://",$key); $key = str_replace("https:///","https://",$key); $key = str_replace("http:/","http://",$key); $key = str_replace("http:///","http://",$key); // echo "\r\n". $key; $fullurl = "https://" . $domain . "/article/" . str_replace(" ","+",$key); $amphtml = "https://" . $domain . "/amparticle/" . str_replace(" ","+",$key); //echo $key; $output = array(); $input = array("s"=> $key); $newsresults = $newsdb->findOne($input); if (isset($newsresults['u'])) { } else { $input = array("u"=> $key); $newsresults = $newsdb->findOne($input); } //$newsresults = $newsresults->getArrayCopy(); $k = 0; $imagefound = ""; $newsresultsarrays = array(); $keywordsarray = array(); $keywordstring = ''; if (isset($newsresults['i'])) { if (($newsresults['i'] != "") and ($imagefound == "")) { /// echo "
" . $imagefound; $imagefound = $newsresults['i']; $imagefound = str_replace("http://","https://",$imagefound); // break; } } if (isset($newsresults['do'])) { } else { $newsresults['do'] = "google.com"; } if (isset($newsresults['t'])) { $title = $newsresults['t'] . " : ". $domain ; } else { $title = "Biggest News aggregator with 200 million news articles | " . $domain ; } $title = str_replace('"','',$title); $title = str_replace('"','',$title); $title = str_replace("'",'',$title); $description = ""; if (isset($newsresults['de'])) { $description = $newsresults['de'] . " Get Live News Updates Every Minute from " . $domain . " Curated from 23000 News Agencies."; } if ((isset($newsresults['k'])) and (is_array($newsresults['k']))) { foreach($newsresults['k'] as $newskeyword) { array_push($keywordsarray,$newskeyword); } $keywordsarray = array_unique($keywordsarray); $keywordsarray = array_values($keywordsarray); foreach($keywordsarray as $keywordarr) { $keywordstring = $keywordstring . "," . ucfirst(str_replace("-"," ",$keywordarr)); } } if ($imagefound == "") { $imagefound = "https://" . $domain . "/images/vimarsana-bigimage.jpg"; } $jsonimage = array(); $jsonimage['@context'] = "https://schema.org"; $jsonimage['@type'] = "ImageObject"; $jsonimage['name'] = $title; $jsonimage['contentUrl'] = $imagefound; $jsonimage = json_encode($jsonimage); $jsonorg = array(); $jsonorg['@context'] = "https://schema.org"; $jsonorg['@type'] = "Organization"; $jsonorg['name'] = $domain; $jsonorg['url'] = "https://" . $domain; $jsonorg['logo'] = 'https://' . $domain . '/assets/images/logo-light-text.png'; $jsonorg['sameAs'][0] = 'https://www.facebook.com/Vimarsana-301253426952651/'; $jsonorg['sameAs'][0] = 'https://twitter.com/Vimarsana1'; $jsonorg = json_encode($jsonorg); $jsonweb = array(); $jsonweb['@context'] = "https://schema.org"; $jsonweb['@type'] = "WebSite"; $jsonweb['name'] = "Vimarsana"; $jsonweb['url'] = "https://". $domain ; $jsonweb = json_encode($jsonweb); $jsonsearch = array(); $jsonsearch['@context'] = "https://schema.org"; $jsonsearch['@type'] = "WebSite"; $jsonsearch['name'] = "Vimarsana"; $jsonsearch['url'] = "https://" . $domain ; $jsonsearch['potentialAction']['@type'] = "SearchAction"; $jsonsearch['potentialAction']['target'] = "https://" . $domain . "/tag/{search_term_string}"; $jsonsearch['potentialAction']['query-input'] = "required name=search_term_string"; $jsonsearch = json_encode($jsonsearch); $keywords = "Live Updates, Breaking News on " . $title . $keywordstring; $title = str_replace('"',"",$title); $title = str_replace('"',"",$title); $title = str_replace("'","",$title); $description = str_replace('"',"",$description); $description = str_replace("'","",$description); $description = str_replace('"',"",$description); $metadescription = substr(strip_tags($description),0,150); ?> <?php echo substr(ucwords($title),0,60) ?> '; echo ''; } ?> ' . $jsonorg . ''; ?> '; } ?>
'; } ?>
",$newsresults['de']); $jsonimage['liveBlogUpdate'][$v]['articleBody'] = $newstitle . "
" . $newsresults['de']; } else { $jsonimage['liveBlogUpdate'][$v]['articleBody'] = $newstitle ; } $jsonimage['liveBlogUpdate'][$v]['image']['@type'] = 'ImageObject'; $jsonimage['liveBlogUpdate'][$v]['image']['contentUrl'] = "https://" . $domain. "/article/" . $newsresults['u']; $jsonimage['liveBlogUpdate'][$v]['image']['width'] = '800'; $jsonimage['liveBlogUpdate'][$v]['image']['height'] = '600'; if ($newsresults['i'] == "") { $jsonimage['liveBlogUpdate'][$v]['image']['url'] = 'https://' . $domain . '/images/vimarsana-bigimage.jpg'; } else { $jsonimage['liveBlogUpdate'][$v]['image']['url'] = $newsresults['i']; } $jsonimage['liveBlogUpdate'][$v]['publisher']['@type'] = 'Organization'; $jsonimage['liveBlogUpdate'][$v]['publisher']['name'] = str_replace(".com","",$newsresults['do']); $jsonimage['liveBlogUpdate'][$v]['publisher']['logo']['@type'] = 'ImageObject'; $jsonimage['liveBlogUpdate'][$v]['publisher']['logo']['url'] = $newsresults['i']; $jsonimage['liveBlogUpdate'][$v]['publisher']['logo']['width'] = '800'; $jsonimage['liveBlogUpdate'][$v]['publisher']['logo']['height'] = '600'; if ($newsresults['i'] == "") { $jsonimage['liveBlogUpdate'][$v]['publisher']['logo']['url'] = 'https://' . $domain . '/images/vimarsana-bigimage.jpg'; } else { $jsonimage['liveBlogUpdate'][$v]['publisher']['logo']['url'] = $newsresults['i']; } $jsonimage['liveBlogUpdate'][$v]['author']['@type'] = 'Organization'; $jsonimage['liveBlogUpdate'][$v]['author']['sameAs'] = $newsresults['do']; $jsonimage['liveBlogUpdate'][$v]['author']['name'] = str_replace(".com","",$newsresults['do']); $jsonimage['coverageEndTime'] = $newsdate . "T12:35:10+00:00"; $v = $v +1 ; echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; // echo '

Date : ' . trim($newsdate) . '

'; // echo '

Source : ' . trim($newsresults['do']) . '

'; echo '

'; if (( $detect->isMobile()) or ($detect->isTablet())) { } else { if ($newsresults['i'] != "") { echo '
Card image cap
'; } else { echo '
'; } } echo '
'; // echo '

' . $newsresults['t'] . ''; if (( $domain == "vimarsana.com") and ($adsshow == 1)) { echo '
'; } if (isset($newsresults['de'])) { if ($newsresults['de'] == "") { echo '

' . $newsresults['t'] . "
" . $newsresults['do'] . " - get the latest breaking news, showbiz & celebrity photos, sport news & rumours, viral videos and top stories from " . $newsresults['do'] . " Daily Mail and Mail on Sunday newspapers." . "

" ; } else { if ($domain == "comparemela.com") { $description = $newsresults['de']; $description = str_replace("https://vimarsana.com","https://comparemela.com",$description); echo '

' . $description . "

" ; } else { echo '

' . $newsresults['de'] . "

" ; } //echo '

' . $newsresults['de'] . "

" ; } } elseif (isset($newsresults['t'])) { echo '

' . $newsresults['t'] . '
' . "
" . $newsresults['do'] . ' - get the latest breaking news, showbiz & celebrity photos, sport news & rumours, viral videos and top stories from ' . $newsresults['do'] . ' Daily Mail and Mail on Sunday newspapers.

'; } else { echo '


' . "
" . $newsresults['do'] . ' - get the latest breaking news, showbiz & celebrity photos, sport news & rumours, viral videos and top stories from ' . $newsresults['do'] . ' Daily Mail and Mail on Sunday newspapers.

'; } if (!isset($newsresults['k'])) { $newsresults['k'] = array('united-states','india'); } if (is_object($newsresults['k'])) { $newsresults['k'] = $newsresults['k']->getArrayCopy(); $count = count($newsresults['k']); for($m=0;$m<$count;$m++) { array_push($keywordsarray,$newsresults['k'][$m]); } } $keywordsarray = array_unique($keywordsarray); $keywordsarray = array_values($keywordsarray); $description = ""; if (isset($newsresults['de'])) { $description = $newsresults['de']; } $pos = strpos($description,"vimarsana.com"); if ($pos === false) { echo '

Related Keywords

'; echo '

'; foreach($keywordsarray as $result) { $resultext = ucwords(str_replace("-"," ",$result)); echo '' . $resultext . ' , '; } echo '

'; } echo '
'; echo '

'; echo '

'; echo '

'; $jsonimage = json_encode($jsonimage); echo ''; ?>
© Vimarsana

© 2020. All Rights Reserved.