From fbfe7aae4028d75c6f06363924fd3d4fd0485e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9A=8F=E9=A3=8E=E8=80=8C=E9=80=9D?= <2215125303@qq.com> Date: Mon, 13 Jan 2025 17:22:17 +0800 Subject: [PATCH] Create 232 --- 232 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 232 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.'}'; + }