2018-10-23 14:13:56 +00:00
|
|
|
<?php
|
2018-10-24 05:28:49 +00:00
|
|
|
|
|
|
|
$json = json_decode(file_get_contents('php://input'));
|
|
|
|
|
2018-10-25 22:29:55 +00:00
|
|
|
$msg = "";
|
2018-10-24 05:28:49 +00:00
|
|
|
|
|
|
|
if ($json->live->is_live)
|
|
|
|
$msg .= "({$json->live->streamer_name}) ";
|
|
|
|
$msg .= "now playing: ";
|
|
|
|
$msg .= $json->now_playing->song->text . " ";
|
|
|
|
$msg .= "~~ {$json->listeners->current} listeners";
|
|
|
|
|
|
|
|
file_put_contents("now_playing.txt", $msg);
|
|
|
|
|