hello all friends.
i used youtube download script
i run this script on localhost this script is good work
but when i upload this script and run then error show this
upload website this
http://earn2btc.000webhostapp.com/videos/index.php?youtubeid=TKUU2PE9Bdc
Warning: Illegal string offset ‘itag’ in /storage/ssd3/383/3128383/public_html/videos/index.php on line 83
Warning: Illegal string offset ‘quality’ in /storage/ssd3/383/3128383/public_html/videos/index.php on line 84
Warning: Illegal string offset ‘type’ in /storage/ssd3/383/3128383/public_html/videos/index.php on line 86
Warning: Illegal string offset ‘url’ in /storage/ssd3/383/3128383/public_html/videos/index.php on line 87
Warning: Illegal string offset ‘expire’ in /storage/ssd3/383/3128383/public_html/videos/index.php on line 89
Warning: Illegal string offset ‘ipbits’ in /storage/ssd3/383/3128383/public_html/videos/index.php on line 90
Warning: Illegal string offset ‘ip’ in /storage/ssd3/383/3128383/public_html/videos/index.php on line 91
Warning: Illegal string offset ‘itag’ in /storage/ssd3/383/3128383/public_html/videos/index.php on line 95
script this
[php]<?php
$key = isset($_REQUEST[‘id’]) ? $_REQUEST[‘id’] : “juZN67BA_5w”;
$output = file_get_contents(‘http://www.youtube.com/get_video_info?&video_id=’.$key);
parse_str($output);
echo ‘
$my_title = $title;
if(isset($url_encoded_fmt_stream_map)) {
$my_formats_array = explode(’,’,$url_encoded_fmt_stream_map);
} else {
echo ‘
No encoded format stream found.
’;echo ‘
Here is what we got from YouTube:
’;echo $output;
}
if (count($my_formats_array) == 0) {
echo ‘
No format stream map found - was the video id correct?
’;exit;
}
$avail_formats[] = ‘’;
$i = 0;
$ipbits = $ip = $itag = $sig = $quality = ‘0’;
$expire = time();
foreach($my_formats_array as $format) {
parse_str($format);
$avail_formats[$i][‘itag’] = $itag;
$avail_formats[$i][‘quality’] = $quality;
$type = explode(’;’,$type);
$avail_formats[$i][‘type’] = $type[0];
$avail_formats[$i][‘url’] = urldecode($url) . ‘&signature=’ .$sig;
parse_str(urldecode($url));
$avail_formats[$i][‘expire’] = date(“G:i:s T”, $expire);
$avail_formats[$i][‘ipbits’] = $ipbits;
$avail_formats[$i][‘ip’] = $ip;
$i++;
}
for ($i = 0; $i < count($avail_formats); $i++) {
$itags = $avail_formats[$i][‘itag’];
echo ‘
‘’ . $itags . ‘ssss ‘.
‘’ . $avail_formats[$i][‘type’] . ’ ’ .
‘(’ . $avail_formats[$i][‘quality’].’’ .
')
}
?>
[/php]
please help