-
Notifications
You must be signed in to change notification settings - Fork 0
/
shit.php
47 lines (44 loc) · 1.28 KB
/
shit.php
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
include_once ("inc.php");
include_once ("functions.php");
function get_name($id)
{
$url='http://api.hungama.com/myplay2/v2/content/music/song_details/'. $id. '?auth_key=4bbaa8370603ed0556eda28ab7c4573a';
$result=file_get_contents($url);
$arr1=json_decode($result,true,12);
if(isset($arr1['response']['code']))
{
echo 'No such record. Please Input Single song only; Not a playlist';
exit();
}
return $arr1['catalog']['content']['title'];
}
function post_comment()
{
global $sessioncode,$sample_headers;
$url = 'http://s-pa.catchmedia.com/web_services/apps/v46/jsonrpc/MediaHandle.py';
$song_id=5953481;
$bitrate="64";
if(isset($_GET['id']))
$song_id=$_GET['id'];
if(isset($_GET['rate']))
$bitrate=$_GET['rate'];
$content=get_query_content("track",$song_id,$bitrate);
// use key 'http' even if you send the request to https://...
$options = array(
'http' => array(
'header' => $sample_headers,
'method' => 'POST',
'content' => $content,
),
);
//var_export($options);
$song_name=get_name($song_id);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$arr1=json_decode($result,true,12);
//var_export($result);
echo $arr1['result']['data']['handle'];
}
post_comment();
?>