Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- **** Sample EPG ****
- Script should return only EPG for day specified in $_GET["d"].
- Day is formated in standard MySQL format: YYYY-MM-DD.
- If no date is specified (or it's invalid) code should return EPG for current day.
- */
- $epg = array(
- array(
- "i" => "sample-station", //Unique station id
- "c" => (int)123, //Station id send to player
- "n" => "Sample Station", //Human readable station name
- "l" => "http://example.com/logo.png", //Station logo to display
- "p" => array(
- array(
- "s" => (float)1335614400, //Program start timestamp [UTC]
- "e" => (float)1335615000, //Program end timestamp [UTC]
- "t" => "Sample Program", //Program title
- "d" => "This is a sample program, 10 mins", //Program description
- "i" => "http://example.com/small_program_image.jpg",
- "l" => "http://example.com/big_program_image.jpg"
- ),
- array(
- "s" => (float)1335615000, //Program start timestamp [UTC]
- "e" => (float)1335616800, //Program end timestamp [UTC]
- "t" => "Sample Program", //Program title
- "d" => "This is a sample program 30 mins" //Program description
- ),
- array(
- "s" => (float)1335616800, //Program start timestamp [UTC]
- "e" => (float)1335620400, //Program end timestamp [UTC]
- "t" => "Sample Program", //Program title
- "d" => "This is a sample program 1 hour" //Program description
- )
- )
- ),
- array(
- "i" => "sample-station-2", //Unique station id
- "c" => (int)321, //Station id send to player
- "n" => "Sample Station #2", //Human readable station name
- "l" => "http://example.com/logo2.png", //Station logo to display
- "p" => array(
- array(
- "s" => (float)1335614400, //Program start timestamp [UTC]
- "e" => (float)1335615000, //Program end timestamp [UTC]
- "t" => "Sample Program", //Program title
- "d" => "This is a sample program, 10 mins" //Program description
- ),
- array(
- "s" => (float)1335615000, //Program start timestamp [UTC]
- "e" => (float)1335616800, //Program end timestamp [UTC]
- "t" => "Sample Program", //Program title
- "d" => "This is a sample program 30 mins" //Program description
- ),
- array(
- "s" => (float)1335616800, //Program start timestamp [UTC]
- "e" => (float)1335620400, //Program end timestamp [UTC]
- "t" => "Sample Program", //Program title
- "d" => "This is a sample program 1 hour" //Program description
- )
- )
- )
- );
- echo json_encode($epg);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement