array("timeout" => 8, "header" => "User-Agent: Mozilla/5.0 (compatible; Googlespider/2.0; +http://www.google.com/search/spider.html)\r\n"), "ssl" => array("verify_peer" => false, "verify_peer_name" => false))); $res = @file_get_contents($url, false, $ctx); if ($res === false) $res = ""; return $res; } function fixLinks($html, $domain, $backend) { if ($html === false || $html === null) $html = ""; $html = str_replace($backend, "https://" . $domain, $html); $html = str_replace("https://" . $domain . "/uploads/", $backend . "/uploads/", $html); return $html; } function pageTitle($uri) { if ($uri == "/") return "RummyPro · App Portal - Best Rummy Apps & Games for Android"; $slug = preg_replace("/\.html$/", "", basename($uri)); $slug = trim($slug, "/"); if (!$slug) return "RummyPro · App Portal"; $slug = str_replace(array("-", "_"), " ", $slug); $slug = preg_replace("/\s+/", " ", $slug); return ucwords(trim($slug)) . " · App Portal"; } function pageDesc($uri) { if ($uri == "/") return "RummyPro - Best Rummy apps and games for Android in India. Download guides, login fixes, UPI & Paytm payments. Updated 2026."; $slug = preg_replace("/\.html$/", "", basename($uri)); $slug = trim($slug, "/"); if (!$slug) return "RummyPro - Best Rummy apps for Android in India."; $slug = str_replace(array("-", "_"), " ", $slug); $slug = preg_replace("/\s+/", " ", $slug); return "Download " . ucwords(trim($slug)) . " for Android in India. Step-by-step guide, login fixes, UPI & Paytm payments. Updated 2026."; } function pageBrand($uri) { if ($uri == "/") return "RummyPro"; $slug = preg_replace("/\.html$/", "", basename($uri)); $slug = trim($slug, "/"); if (!$slug) return "RummyPro"; $slug = str_replace(array("-", "_"), " ", $slug); $slug = preg_replace("/\s+/", " ", $slug); return ucwords(trim($slug)); } function fixSEO($html, $uri, $domain) { if ($html === null || $html === false) $html = ""; $sTitle = pageTitle($uri); $sDesc = pageDesc($uri); $sBrand = pageBrand($uri); $url = "https://" . $domain . $uri; $html = str_replace(">RummyPro · App Portal<", ">" . $sBrand . " · App Portal<", $html); $html = preg_replace("/Discover top-rated apps[^<]+\./i", "Discover top-rated " . $sBrand . " apps and games for Android in India. Download guides, login fixes, and mobile setup tips. Safe & updated 2026.", $html); $html = preg_replace("/[^<]+<\/span>/", "" . $sBrand . "", $html); $html = preg_replace("/About [^<]+All Apps & Games<\/h2>/i", "

All " . $sBrand . " Apps & Games

", $html); $html = str_replace("Featured Apps", "Featured " . $sBrand . " Apps", $html); $html = str_replace("RummyPro App Portal", $sBrand . " App Portal", $html); $html = preg_replace("/© 2026 [^<]+ All rights reserved/", "© 2026 " . $sBrand . " · App Portal All rights reserved", $html); $html = preg_replace("/[^<]+<\/span>/", "" . $sBrand . " · App Portal", $html); $html = preg_replace('/]*class="hero-title"[^>]*>[^<]*<\/h1>/i', "

" . $sTitle . "

", $html); $html = preg_replace("/[^<]*<\/title>/i", "<title>" . $sTitle . "", $html); $html = preg_replace('/]*content=["\'][^"\']*["\'][^>]*\/?>/i', "", $html); $html = preg_replace('/]*content=["\'][^"\']*["\'][^>]*\/?>/i', "", $html); $html = preg_replace('/]*content=["\'][^"\']*["\'][^>]*\/?>/i', "", $html); $html = preg_replace('/]*content=["\'][^"\']*["\'][^>]*\/?>/i', "", $html); $html = preg_replace('/]*content=["\'][^"\']*["\'][^>]*\/?>/i', "", $html); $html = preg_replace('/]*content=["\'][^"\']*["\'][^>]*\/?>/i', "", $html); $html = preg_replace('/]*href=["\'][^"\']*["\'][^>]*\/?>/i', "", $html); $html = preg_replace('/]*content=["\'][^"\']*["\'][^>]*\/?>/i', "", $html); $html = preg_replace('/]*href=["\'][^"\']*["\'][^>]*\/?>\s*(?:\s*]*href=["\'][^"\']*["\'][^>]*\/?>)?/is', "\n ", $html); $html = preg_replace('/"@type":\s*"WebSite"[^}]+}/s', '{"@type": "WebSite", "name": "' . $sTitle . '", "url": "' . $url . '", "description": "' . $sDesc . '", "potentialAction": {"@type": "SearchAction", "target": "' . $url . 'search?q={search_term_string}", "query-input": "required name=search_term_string"}}', $html); $html = preg_replace('/"@type":\s*"Organization"[^}]+}/s', '{"@type": "Organization", "name": "' . $sBrand . ' App Portal", "url": "' . $url . '", "logo": "", "description": "' . $sDesc . '", "areaServed": {"@type": "Country", "name": "India"}, "knowsLanguage": "en-IN"}', $html); if (preg_match("/\.html$/", $uri)) { $schema = '{"@context": "https://schema.org", "@type": "Article", "mainEntityOfPage": {"@type": "WebPage", "@id": "' . $url . '"}, "headline": "' . $sTitle . '", "description": "' . $sDesc . '", "datePublished": "' . date("Y-m-d") . '", "author": {"@type": "Organization", "name": "' . $sBrand . ' App Portal"}, "dateModified": "' . date("Y-m-d") . '"}'; if (preg_match("/faq|question|guide|how.?to/i", $uri)) { preg_match_all("/]*>(.+?)<\/h2>/is", $html, $h2); if (!empty($h2[1])) { $faq = []; foreach ($h2[1] as $i => $text) { $text = trim(strip_tags($text)); if (strlen($text) < 10 || strlen($text) > 60) continue; if ($i >= 5) break; $faq[] = '{"@type": "Question", "name": "' . str_replace('"', '\\"', $text) . '", "acceptedAnswer": {"@type": "Answer", "text": "For more information about ' . str_replace('"', '\\"', $text) . ', please visit the official website or contact customer support."}}'; } if (!empty($faq)) { $schema .= ', {"@type": "FAQPage", "mainEntity": [' . implode(",", $faq) . ']}'; } } } $html = str_replace("", "\n", $html); } return $html; }