<?php
$dict = bdec_file('public/downloads/torrents/'.$id.'.torrent', (1024 * 1024) );
$dirname = $dict['value']['info']['value']['name']['value'];
$sql = $db->query("SELECT * FROM files WHERE id_torrent = ".$arr['id']." ORDER BY id");
if(!$db->num_rows($sql)) {
err("ќшибка" , "»звините , но наша система не нашла файлов" , 1);
}
?>
<script language="JavaScript" src="public/js/player_js/swfobject.js"></script>
<script language="JavaScript" src="public/js/player_js/uppod-0.6.3.js"></script>
<script language="JavaScript" src="public/js/player_js/player.js"></script>
<div id="player"></div>
<script type="text/javascript">
vars = {
id: 'player',
type: 'video',
<?
$uppodPl = new stdClass();
$uppodPl->playlist = array();
$currentSeason = "";
while($row = $db->get_row($sql))
{
$result = strip_tags(iconv("utf-8" , "windows-1251" , $row['filename']));
$filename = explode("/", $result);
$currentItem = explode("/", $row["filename"]);
$seasonIndex = explode("_", $currentItem0]);
$seasonIndex = $seasonIndex[1];
$episodeIndex = explode(".", $currentItem[1]);
$episodeIndex = explode("_", $episodeIndex[0]);
$episodeIndex = $episodeIndex[1];
if($currentSeason != $seasonIndex)
{
$currentSeason = $seasonIndex;
$seasonContent = new stdClass();
$seasonContent->comment = "Сезон ".$currentSeason;
$seasonContent->playlist = array();
array_push($uppodPl->playlist, $seasonContent);
}
$episodeContent = new stdClass();
$episodeContent->comment = "Серия ".$episodeIndex;
$episodeContent->file = "http://mp4.sitename.com/serials/$dirname/$filename[0]/$filename[1]/index.m3u8";
array_push($uppodPl->playlist[count($uppodPl->playlist) - 1]->playlist, $episodeContent);
}
echo json_encode($uppodPl);
?>
swf: 'public/uppod.swf',
style: {w: '700px', h: '400px'},
st5: 'uppodvideo',
st: 'public/skin.txt',
swf: 'public/uppod-hls.swf',
finder: 'flash',
};
new Player(vars);
</script>
<div id="player"></div>
<script type="text/javascript">
vars = {
id: 'player',
type: 'video',
swf: 'public/uppod.swf',
style: {w: '700px', h: '400px'},
st5: 'uppodvideo',
st: 'public/skin.txt',
swf: 'public/uppod-hls.swf',
finder: 'flash',
};
new Player(vars);
</script>
$dict = bdec_file('public/downloads/torrents/'.$id.'.torrent', (1024 * 1024) );
$dirname = $dict['value']['info']['value']['name']['value'];
$sql = $db->query("SELECT * FROM files WHERE id_torrent = ".$arr['id']." ORDER BY id");
if(!$db->num_rows($sql)) {
err("Ошибка" , "»Извините, но наша система не нашла файлов" , 1);
}
while($row = $db->get_row($sql) ) {
$result = strip_tags(iconv("utf-8" , "windows-1251" , $row['filename']));
$filename = explode("/", $result);
echo "http://mp4.sitename.com/serials/$dirname/$filename[0]/$filename[1]/index.m3u8"
}
{"id":"1120","id_torrent":"930","filename":"episode_1\/\u0421\u0435\u0440\u0438\u044f_1.sitename.com.mp4","size":"318294280"}
{"id":"1121","id_torrent":"930","filename":"episode_1\/\u0421\u0435\u0440\u0438\u044f_2.sitename.com.mp4","size":"293116949"}
{"id":"1122","id_torrent":"930","filename":"episode_1\/\u0421\u0435\u0440\u0438\u044f_3.sitename.com.mp4","size":"313956264"}
{"id":"1123","id_torrent":"930","filename":"episode_1\/\u0421\u0435\u0440\u0438\u044f_4.sitename.com.mp4","size":"313719173"}
{"id":"1124","id_torrent":"930","filename":"episode_1\/\u0421\u0435\u0440\u0438\u044f_5.sitename.com.mp4","size":"266063245"}
{"id":"1125","id_torrent":"930","filename":"episode_1\/\u0421\u0435\u0440\u0438\u044f_6.sitename.com.mp4","size":"333489115"}
{"id":"1126","id_torrent":"930","filename":"episode_1\/\u0421\u0435\u0440\u0438\u044f_7.sitename.com.mp4","size":"323085512"}
{"id":"1127","id_torrent":"930","filename":"episode_2\/\u0421\u0435\u0440\u0438\u044f_1.sitename.com.mp4","size":"318209428"}
{"id":"1128","id_torrent":"930","filename":"episode_2\/\u0421\u0435\u0440\u0438\u044f_2.sitename.com.mp4","size":"293116949"}
{"id":"1129","id_torrent":"930","filename":"episode_2\/\u0421\u0435\u0440\u0438\u044f_3.sitename.com.mp4","size":"313956264"}
{"id":"1130","id_torrent":"930","filename":"episode_2\/\u0421\u0435\u0440\u0438\u044f_4.sitename.com.mp4","size":"313719173"}
{"id":"1131","id_torrent":"930","filename":"episode_2\/\u0421\u0435\u0440\u0438\u044f_5.sitename.com.mp4","size":"266063245"}
{"id":"1132","id_torrent":"930","filename":"episode_2\/\u0421\u0435\u0440\u0438\u044f_6.sitename.com.mp4","size":"333489115"}
{"id":"1133","id_torrent":"930","filename":"episode_2\/\u0421\u0435\u0440\u0438\u044f_7.sitename.com.mp4","size":"323085512"}
Я не могу так настроит потому что во 1) у меня nginx + apache2. Во 2) по начале я настроил single mode а не mutli-user.