마왕을 그리워하시는분께-

마왕을 그리워하시는분께- 

 

짤막한 코드를 한줄 남깁니다...

 

#!/usr/bin/php -q

<?php
$start 
strtotime('2011-05-09');
$end strtotime('2011-10-22');
for (
$i=$start;$i<=$end;$i=$i+60*60*24) {
    
$url 'http://podcastfile.imbc.com/cgi-bin/podcast.fcgi/podcast/ghoststation/ghoststation_'.date('Ymd',$i).'.mp3';
    
$cs curl_init();
    
curl_setopt($cs,CURLOPT_URL,$url);
    
curl_setopt($cs,CURLOPT_RETURNTRANSFER,1);
    
curl_setopt($cs,CURLOPT_FOLLOWLOCATION,1);
    
$buffer curl_exec($cs);
    
$cinfo curl_getinfo($cs);
    
curl_close($cs);

    if (
$cinfo['http_code'] == 200 && $cinfo['content_type'] == 'audio/mpeg') {
        if (
is_dir('files') == false) {
            
mkdir('files');
            
chmod('files',0707);
        }
        
        
$filepath './files/ghoststation_'.date('Ymd',$i).'.mp3';
        
$fp fopen($filepath,'w');
        
fwrite($fp,$buffer);
        
fclose($fp);
        
        echo 
$filepath."\n";
    }
}

?> 

|

댓글 4개

감사합니다 . 알쯔님
프로그래머의 애도방법.php
프로그래머가 아니라 뭔 내용인지;
mbc에서 했던 마왕의 고스트스테이션 팟캐스트 전회분을 다운받는 소스입니다. :)
댓글을 작성하시려면 로그인이 필요합니다. 로그인

자유게시판

+
제목 글쓴이 날짜 조회
11년 전 조회 2,013
11년 전 조회 1,219
11년 전 조회 1,194
11년 전 조회 1,818
11년 전 조회 1,973
11년 전 조회 1,819
11년 전 조회 1,237
11년 전 조회 1,163
11년 전 조회 1,100
11년 전 조회 1,057
11년 전 조회 1,084
11년 전 조회 1,158
11년 전 조회 1,096
11년 전 조회 1,140
11년 전 조회 1,156
11년 전 조회 1,168
11년 전 조회 1,469
11년 전 조회 1,931
11년 전 조회 1,302
11년 전 조회 1,804
11년 전 조회 1,189
11년 전 조회 1,118
11년 전 조회 1,167
11년 전 조회 1,106
11년 전 조회 1,089
11년 전 조회 1,168
11년 전 조회 1,108
11년 전 조회 1,395
11년 전 조회 1,109
11년 전 조회 1,821
🐛 버그신고