<?php
error_reporting(0);
header("Content-type: text/xml; charset=GB18030");
function vvfox($id) {
	$url = "http://music.sina.com.cn/yueku/m.php?id=$id";
	$str = file_get_contents($url);
	preg_match('|","url":"([^"]+)","type"|', $str, $ar);
	$baseurl = $ar[1];
	$linkurl = urldecode(base64_decode($baseurl));
	$str2 = file_get_contents($linkurl);
	preg_match('|iask_music_song_url="([^"]+)";|', $str2, $arr);
	$musicurl = $arr[1];
	header("location:$musicurl");
}
if (isset ($_GET['id'])) {
	vvfox($_GET['id']);
}
?>