1280 ¹ø ±ÛÀÇ ´äÀå±Û: Re: Re: [PHP/MP3] APACHE/PHP4 base module(?)Áú¹® |
±Û¾´ÀÌ: À±À纴
|
±Û¾´³¯: 2003³â 01¿ù 13ÀÏ 22:17:02 ¿ù(Àú³á) |
Á¶È¸: 565 |
±Û¼öÁ¤ÀÌ ¾ø³×¿ä..
ÀÌ ¹æ¹ýÀ¸·Î´Â µð·ºÅ丮 À̸§¿¡ °ø¹é¹®ÀÚ°¡ ÀÖÀ¸¸é ¾ÈµÇ´Â ±º¿ä..
Çѱ۵µ µÇ´Â°Í °°½À´Ï´Ù¸¸.. Á¦ »óȲ¿¡¼¸¸ µÇ´Â°ÉÁöµµ...
¾Æ¸¶ Çѱ۶§¹®¿¡ base64_encode¸¦ ¾²½Å°Å °°Àºµ¥¿ä.. ¸Â´ÂÁö¿ä?
[À±À纴]´ÔÀÌ ³²±â½Å ±Û:
>µð·ºÅ丮 ¼±ÅÃÀº ÀÏ´Ü ¼º°øÇÏ¿´½À´Ï´Ù.
>
>
>## configuration ################################
>##
>$path='/www/mp3';
>$not = 0; // don't print check microtime result
>//$dir='/GOODS';
>$mp3_dir = "$path"."$dir"; // do not set ducumentroot inside
>//$lame = '/usr/local/bin/lame'; // require lame(http://www.mp3dev.org/)
>$log_dir = '/www/mp3/log'; // logging directory(nobody access and
writable)
>##
>## end configuration #############################
>
>ÀÌ·¸°Ô $path¿¡ mp3±âº» µð·ºÅ丮¸¦ Á¤ÇÏ°í $dirÀ» ÁÖ¼Ò·Î ?dir=/fsdfsd ÀÌ·±½ÄÀ¸·Î ÇÏ¿©
ÇÕÄ£ $mp3_dirÀ» »ç¿ëÇÏ¿´½À´Ï´Ù.
>
>
>## mp3 playlist core module
>## 2002.05.15 patch random play(for direct access BAD user)
>##
>function php_mp3plist($mp3_dir, $mp3list='', $player='') // $mp3list =
array();
>{
> global $_SERVER, $dir;
>
> if(is_array($mp3list)) {
> if($player) { // for BAD user
> $randkey = array_rand($mp3list);
> if(is_readable("$mp3_dir/".base64_decode($randfile=$mp3list[$randkey])))
{
> $ftype = get_ftype($randfile);
> header("Location:
http://$_SERVER[HTTP_HOST]$_SERVER[_PHP_SELF]".
> "?dir=$dir&stream=$randfile$ftype[ext]");//À©¾ÚÇÁ¿¡
³Ñ±â¸¦ ¸®½ºÆ®¿¡ $dirÀ» ÷°¡ÇÏ¿´½À´Ï´Ù.
> }
> exit;
> }
> header('Content-Disposition: inline; filename=playlist_lcn.m3u');
> header('Content-Type: audio/x-mpegurl');
> foreach($mp3list AS $k=>$v) {
> if(is_readable($mp3file="$mp3_dir/".base64_decode($v))) {
> $vd="dir=$dir";
> $ftype = get_ftype($mp3file);
> echo "http://$_SERVER[HTTP_HOST]$_SERVER[_PHP_SELF]".
> "?$vd&stream=$v$ftype[ext]\n";]");//À©¾ÚÇÁ¿¡
³Ñ±â¸¦ ¸®½ºÆ®¿¡ $dirÀ» ÷°¡ÇÏ¿´½À´Ï´Ù.
>
> }
> }
> } else exit; // stop
>}
>
>[À±À纴]´ÔÀÌ ³²±â½Å ±Û:
>
>>´äº¯ ´ë·Î Çϴϱî ÀߵǴ±º¿ä.
>>Á¦°¡ À̼ҽº¸¦ °¡Áö°í, ÆÄÀϸ®½ºÆ®¸¦ º¸¿©ÁÖ¸é¼ À½¾ÇÆÄÀÏÀ» ¼±ÅÃÇÏ´Â °É Â¥·Á°í
ÇÕ´Ï´Ù. óÀ½ ½Ãµµ·Î play.php?mp3_dir=/www/mp3/a_capella
>>ÀÌ·±½ÄÀ¸·Î ºÎ¸£´Ï±î À©¾ÚÇÁÀÇ ÆÄÀÏ ¸®½ºÆ®´Â ¶ß´Âµ¥ ÁÖ¼Ò¿¡·¯ °°Àº°É·Î Ç÷¹À̸¦
¸øÇÕ´Ï´Ù. ¹°·Ð unset($mp3_dir);Àº ÁÖ¼®Ã³¸® Çß½À´Ï´Ù.
>>
>>¿Ö±×·±°ÅÁÒ?
>>
>>¸Õ°¡ ¿øº»ÀûÀÎ Á¦ÇÑÀÌ ÀÖ´ÂÁö¿ä?
>>¼Ò½º¾È¿¡ $mp3_dirÀÌ Á¤ÀÇ µÇ¾îÀÖÀ¸¸é Á¤»óÀÛµ¿ µÇ°í ¿ÜºÎ¿¡¼
play.php?mp3_dir=/www/mp3/a_capella ÀÌ·±½ÄÀ¸·Î ÇÏ¸é ¾ÈµÇ´Â ÀÌÀ¯°¡
¹»±î¿ä..
>>
>>±×·³ ÁÁÀº ÇÏ·ç µÇ¼¼¿ä.
>
>========================================
>
========================================
|
ÀÌÀü±Û : Re: [PHP/MP3] APACHE/PHP4 base module(?)Áú¹®
´ÙÀ½±Û : Re: Re: Re: [PHP/MP3] APACHE/PHP4 base module(?)Áú¹®
|
from 210.123.117.165
JS(Redhands)Board 0.4 +@
|