-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathget-new-media.php
More file actions
18 lines (18 loc) · 737 Bytes
/
get-new-media.php
File metadata and controls
18 lines (18 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
error_reporting(0);
header("content-type: application/json; charset= UTF-8");
$api = "https://api.ineo-team.ir"; //don't change it.
$parameters = array(
'auth' => "rj9143484418", // http-access-token
'action' => "new", // request method
'type' => "music", // music/video/podcast/album
);
$output = json_decode(file_get_contents($api."/radiojavan.php?".http_build_query($parameters)));
if($output->status == "successfully"){
$r = $output->result;
echo json_encode(['ok' => true, 'status' => "successfully", 'result' => ['count' => $r->count, 'type' => $r->type, 'newResult' => $r->new_result]]);
}else{
echo json_encode(['ok' => false, 'status' => $output->status]);
}
unlink("error_log");
?>