<?php
error_reporting(0);
header("Content-type: text/xml; charset=utf-8");
function vvfox($id){
         $url = "http://huodong.duomi.com/songtaste/?songid=$id";
         $str = file_get_contents($url);
         preg_match('|var mp3url = "([^"]+)";|', $str, $ar);
         preg_match('|var songname = "([^"]+)";|', $str, $arr);
         $musicurl = $ar[1];
         $musicname = $arr[1];
         $duomiurl = 'duomi://t=o&ac=d&u='.$musicurl.'&sn='.$musicname;
         header("location:$musicurl");
}
if (isset ($_GET['id'])) {
   vvfox($_GET['id']);
}
?>