-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmedia-information.php
More file actions
33 lines (33 loc) · 1.28 KB
/
media-information.php
File metadata and controls
33 lines (33 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?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' => "rj2995170299", // http-access-token
'action' => "idfinder", // request method
'link' => "https://www.radiojavan.com/mp3s/mp3/Hamid-Sefat-Too-Deli" // radiojavan music/video/podcast link
);
$output = json_decode(file_get_contents($api."/radiojavan.php?".http_build_query($parameters)));
if($output->status == "successfully"){
$id = $output->result->id;
$type = $output->result->type;
if(!in_array($type, ['music', 'video', 'podcast'])){
echo json_encode(['ok' => false, 'status' => "unknown type"]);
exit();
}
$param = array(
'auth' => "rj2995170299",
'action' => $type, //music or video or podcast
'id' => $id
);
$out = json_decode(file_get_contents($api."/radiojavan.php?".http_build_query($param)));
if($out->status != "successfully."){
echo json_encode(['ok' => false, 'status' => $out->status]);
exit();
}
echo json_encode(['ok' => true, 'status' => "successfully", 'result' => $out->result]);
}else{
echo json_encode(['ok' => false, 'status' => $output->status]);
}
unlink("error_log");
?>