?? mpi.func.readme.txt
字號:
mpi.inc.php函數說明:1、構造函數PushInitiator()Function Prototype:PushInitiator() -- 初始化時不傳遞任何參數,采用默認的PPG來發送PushInitiator($ppg_url) -- 傳遞一個參數,以http://www.ppg.com:port/uri的形式PushInitiator($ppg_ip,$ppg_port,$ppg_url) -- 傳遞三個參數,分別是PPG IP地址、PPG端口、PPG處理的URL $strget = ""; // 設置讀取超時時間 stream_set_timeout($fp, 5); // 讀 HTTP 頭部信息 while(!feof($fp)) { $ls_Str = fgets($fp,1024); if( !trim($ls_Str) ) { break; } $pos = strpos( $ls_Str, ": " ); $sso_headers[ substr($ls_Str,0,$pos) ] = substr($ls_Str,$pos+2); $stream_status = stream_get_meta_data($fp); if( $stream_status["timed_out"]==true ) { $other_error_info = join( "\n", $sso_headers ); error_and_exit( "服务器繁忙,请稍后再试。." ); } } // 按長度讀取 if( $sso_headers["Content-Length"] ) { $strget = fread( $fp, intval($sso_headers["Content-Length"]) ); $stream_status = stream_get_meta_data($fp); if( $stream_status["timed_out"]==true ) { $other_error_info = $strget; error_and_exit( "服务器繁忙,请稍后再试。.." ); } } // 一個字節一個字節的讀 else { while(!feof($fp)) { $ls_Str = fread($fp,1); $strget .= $ls_Str; if( strstr($strget,"</misc_command>") ) { break; } $stream_status = stream_get_meta_data($fp); if( $stream_status["timed_out"]==true ) { $other_error_info = $strget; error_and_exit( "服务器繁忙,请稍后再试。..." ); } } } fclose($fp);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -