\r\n\r\n\r\n提示信息\r\n\r\n"; $htmlhead .= "\r\n\r\n\r\n
\r\n\r\n
\r\n\r\n\r\n"; $litime = $limittime == 0 ? 1000 : $limittime; $func = ""; if ( $gourl == "-1" ) { if ( $limittime == 0 ) { $litime = 5000; } $gourl = "javascript:history.go(-1);"; } if ( $gourl == "" || $onlymsg == 1 ) { $msg = ""; } else { if ( preg_match( "/close::/", $gourl ) ) { $tgobj = trim( preg_replace( "/close::/", "", $gourl ) ); $gourl = "javascript:;"; $func .= "window.parent.document.getElementById('".$tgobj."').style.display='none';\r\n"; } $func .= " var pgo=0;\r\n function JumpUrl(){\r\n if(pgo==0){ location='".$gourl."'; pgo=1; }\r\n }\r\n"; $rmsg = $func; $rmsg .= "document.write(\"
"; $rmsg .= "
提示信息!
\");\r\n"; $rmsg .= "document.write(\"

\");\r\n"; $rmsg .= "document.write(\"".str_replace( "\"", "“", $msg )."\");\r\n"; $rmsg .= "document.write(\""; if ( $onlymsg == 0 ) { if ( $gourl != "javascript:;" && $gourl != "" ) { $rmsg .= "
如果你的浏览器没反应,请点击这里..."; $rmsg .= "
\");\r\n"; $rmsg .= "setTimeout('JumpUrl()',".$litime.");"; } else { $rmsg .= "
\");\r\n"; } } else { $rmsg .= "

\");\r\n"; } $msg = $htmlhead.$rmsg.$htmlfoot; } echo $msg; exit( ); } public static function getDomain( ) { $HOST = $_SERVER['HTTP_HOST']; $HOST = strtolower( $HOST ); if ( strpos( $HOST, "/" ) !== FALSE ) { $parse = @parse_url( $HOST ); $HOST = $parse['host']; } $topleveldomaindb = array( "biz", "com", "edu", "gov", "info", "int", "mil", "name", "net", "org", "pro", "aero", "cat", "coop", "jobs", "museum", "travel", "mobi", "asia", "tel", "arpa", "root", "tel", "post", "geo", "kid", "mail", "sco", "web", "xxx", "ac", "ad", "ae", "af", "ag", "ai", "al", "am", "an", "ao", "aq", "ar", "as", "at", "au", "aw", "az", "ba", "bb", "bd", "be", "bf", "bg", "bh", "bi", "bj", "bm", "bn", "bo", "br", "bs", "bt", "bv", "bw", "by", "bz", "ca", "cc", "cd", "cf", "cg", "ch", "ci", "ck", "cl", "cm", "cn", "co", "cr", "cu", "cv", "cx", "cy", "cz", "de", "dj", "dk", "dm", "do", "dz", "ec", "ee", "eg", "er", "es", "et", "eu", "fi", "fj", "fk", "fm", "fo", "fr", "ga", "gd", "ge", "gf", "gg", "gh", "gi", "gl", "gm", "gn", "gp", "gq", "gr", "gs", "gt", "gu", "gw", "gy", "hk", "hm", "hn", "hr", "ht", "hu", "id", "ie", "il", "im", "in", "io", "iq", "ir", "is", "it", "je", "jm", "jo", "jp", "ke", "kg", "kh", "ki", "km", "kn", "kr", "kw", "ky", "kz", "la", "lb", "lc", "li", "lk", "lr", "ls", "lt", "lu", "lv", "ly", "ma", "mc", "md", "me", "mg", "mh", "mk", "ml", "mm", "mn", "mo", "mp", "mq", "mr", "ms", "mt", "mu", "mv", "mw", "mx", "my", "mz", "na", "nc", "ne", "nf", "ng", "ni", "nl", "no", "np", "nr", "nu", "nz", "om", "pa", "pe", "pf", "pg", "ph", "pk", "pl", "pm", "pn", "pr", "ps", "pt", "pw", "py", "qa", "re", "ro", "ru", "rw", "sa", "sb", "sc", "sd", "se", "sg", "sh", "si", "sk", "sl", "sm", "sn", "so", "sr", "st", "sv", "sy", "sz", "tc", "td", "tf", "tg", "th", "tj", "tk", "tl", "tm", "tn", "to", "tr", "tt", "tv", "tw", "tz", "ua", "ug", "uk", "us", "uy", "uz", "va", "vc", "ve", "vg", "vi", "vn", "vu", "wf", "ws", "ye", "yt", "yu", "za", "zm", "zw" ); $str = ""; foreach ( $topleveldomaindb as $ConfigControllerComponentCancel ) { $str .= ( $str ? "|" : "" ).$ConfigControllerComponentCancel; } $matchstr = "[^\\.]+\\.(?:(".$str.")|\\w{2}|((".$str.")\\.\\w{2}))\$"; if ( preg_match( "/".$matchstr."/ies", $HOST, $matchs ) ) { $domain = $matchs['0']; return $domain; } $domain = $HOST; return $domain; } public static function curl( $url, $postFields = NULL ) { $ch = curl_init( ); curl_setopt( $ch, CURLOPT_URL, $url ); curl_setopt( $ch, CURLOPT_FAILONERROR, FALSE ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, TRUE ); curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch, CURLOPT_COOKIE, "_lang=zh_CN:GBK" ); if ( 5 < strlen( $url ) && strtolower( substr( $url, 0, 5 ) ) == "https" ) { curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, FALSE ); curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, FALSE ); } if ( is_array( $postFields ) && 0 < count( $postFields ) ) { $postBodyString = ""; $postMultipart = FALSE; foreach ( $postFields as $append_editor => $ConfigControllerComponentCancel ) { if ( "@" != substr( $ConfigControllerComponentCancel, 0, 1 ) ) { $postBodyString .= "{$append_editor}=".urlencode( $ConfigControllerComponentCancel )."&"; } else { $postMultipart = TRUE; } } unset( $? ); unset( $? ); curl_setopt( $ch, CURLOPT_POST, TRUE ); if ( $postMultipart ) { curl_setopt( $ch, CURLOPT_POSTFIELDS, $postFields ); } else { curl_setopt( $ch, CURLOPT_POSTFIELDS, substr( $postBodyString, 0, -1 ) ); } } $reponse = curl_exec( $ch ); if ( curl_errno( $ch ) ) { throw new Exception( curl_error( $ch ), 0 ); } $httpStatusCode = curl_getinfo( $ch, CURLINFO_HTTP_CODE ); if ( 200 !== $httpStatusCode ) { throw new Exception( $reponse, $httpStatusCode ); } curl_close( $ch ); return $reponse; } } ?>