diff --git a/232 b/232 new file mode 100644 index 000000000..eea61e9fd --- /dev/null +++ b/232 @@ -0,0 +1,24 @@ +public function listen($id,$time){ + $ids = array(); + $count=0; + $t=1; + $songid = $this->getsongid($id); + while($t <= $time){ + foreach ($songid as $index => $trackId) { + $ids[$count]["action"]="play"; + $ids[$count]["json"]["download"] =0 ; + $ids[$count]["json"]["end"] ="playend"; + $ids[$count]["json"]["id"] = $trackId["id"]; + $ids[$count]["json"]["sourceId"] =""; + $ids[$count]["json"]["time"] = 240; + $ids[$count]["json"]["type"] ="song"; + $ids[$count]["json"]["wifi"] =0; + $count++; + } + $t++; + } + $data =json_encode($ids); + $url = "http://music.163.com/weapi/feedback/weblog"; + $this->curl($url,$this->prepare(array("logs"=>$data))); + return '{"code":200,"count":'.$count.'}'; + }