小偷google音乐入drupal库

(.*)<\/a>/',$content,$aaa);
//print_r($aaa[1]);
foreach($aaa[1] as $key=>$bbb){
$node = new stdClass();
$node->title = iconv("GB2312","UTF-8",unescape($aaa[3][$key]));
$node->body = $bbb;
$node->path = iconv("GB2312","UTF-8",unescape($aaa[3][$key]));
$node->type = 'music';
$node->uid = 1;
$node->taxonomy = array('',7,68);
$sql = 'select dst from url_alias where dst="'.$node->title.'"';
$result = db_query($sql);

$data = db_fetch_object($result);
if($data->dst != ''){
echo 'aaa';
}else{
node_save($node);
}
}
function unescape($str) {
$str = rawurldecode($str);
preg_match_all("/(?:%u.{4})|&#x.{4};|&#\d+;|.+/U",$str,$r);
$ar = $r[0];
//print_r($ar);
foreach($ar as $k=>$v) {
if(substr($v,0,2) == "%u")
$ar[$k] = iconv("UCS-2","GB2312",pack("H4",substr($v,-4)));
elseif(substr($v,0,3) == "&#x")
$ar[$k] = iconv("UCS-2","GB2312",pack("H4",substr($v,3,-1)));
elseif(substr($v,0,2) == "&#") {
//echo substr($v,2,-1)."
";
$ar[$k] = iconv("UCS-2","GB2312",pack("n",substr($v,2,-1)));
}
}
return join("",$ar);
}
?>