PHP JSON генерация страниц под ForkPlayer

Материал из ForkPlayer Wiki
Перейти к: навигация, поиск

В playlist_url ссылки на страницы

В stream_url на видеофайлы, moonwalk iframe видео плеер и т.д.

<?php

$_CH[]=["title"=>"1 c","playlist_url"=>"","stream_url"=>"","description"=>""];

$_CH[]=["title"=>"2 c","playlist_url"=>"","stream_url"=>"","description"=>""];

$_CH[]=["title"=>"3 c","playlist_url"=>"","stream_url"=>"","description"=>""];

$_PL["background_image"]=$sitebackground;

$_PL["icon"]=$siteicon;

$_PL["channels"]=$_CH;

if(!empty($sitechbkg)) $_PL["style"]["site"]["channels"]["default"]["background"]="none";

if(!empty($sitecolor)) {

$_PL["style"]["site"]["channels"]["default"]["color"]=$sitecolor;

$_PL["style"]["site"]["infoList"]["color"]=$sitecolor;

}

if(!empty($sitechbkg)) $_PL["style"]["site"]["channels"]["selected"]["background"]="none $sitechbkg"; if(!empty($sitechcolor)) $_PL["style"]["site"]["channels"]["selected"]["color"]=$sitechcolor;

print json_encode($_PL);