PHP程式碼
//取得遠端檔案資訊 function remote_file_info($url){ $ch = curl_init($url); curl_setopt( $ch, CURLOPT_NOBODY, true ); curl_setopt( $ch, CURLOPT_HEADER, false ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, false ); curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch, CURLOPT_MAXREDIRS, 3 ); curl_exec( $ch ); $headerInfo = curl_getinfo( $ch ); curl_close( $ch ); return $headerInfo; }
0 意見:
張貼留言