본문 바로가기
실시간TV∴영화∴드라마∴예능

PhP script to parse Shoutcast metadata?

반응형

If you want to use PHP , you need to make a PHP file with this contents :

 

<?php
function get_data($url)
{
$ch = curl_init();
$timeout = 5;
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}

$data = get_data('localhost:portnumber/admin.cgi?mode=viewxml&pass=youradminpass&page=5&sid=1');
$xml = simplexml_load_string($data);
?>

the $xml have some Objects that they have Meta information , and you can Easily Print them , i will show you an Example :

<?php
echo $xml->SONGMETADATA->TPE1;
?>

this one can Print Artist Name .

if you need to know Objects name , go to :
yourdomain:yourport/admin.cgi?mode=viewxml&pass=youradminpass&page=5&sid=1

* You need to run PHP script on the Server that you running Shoutcast Server .

that's all , and sorry for my bad English .

반응형

'유용한정보' 카테고리의 다른 글

인라이브 서버주소 확인방법  (0) 2021.03.16
BEST 음악방송  (0) 2020.12.10
SHOUTcast Stream Ripper  (0) 2016.02.15
SHOUTcast/Installation  (0) 2016.02.15
SHOUTCast AutoDJ  (0) 2016.02.09
PHP cURL to kick Shoutcast Source  (0) 2016.02.09
검색엔진 최적화. 꼭 알아야 할 HTTP 상태 코드  (0) 2016.02.07
각종 확장자 파일모음  (0) 2016.02.01

댓글


Copyright ⓒ SmartWeb All rights reserved.