26 lines
1.2 KiB
PHP
26 lines
1.2 KiB
PHP
<?php
|
|
header("Content-Type: application/json");
|
|
$tia_content = [["tia_type"=>"creator","tia_data"=>["tia_title"=>"Mike Nolan's Holy Videos", "tia_id"=>"7f286552-118e-4496-bd4c-8876c9cc7b96","tia_description_type"=>"text","tia_description"=>"I am Mike Nolan And I am a computer programmer, who found Jesus.\nI am also the person who created TIA."]]];
|
|
$videos = scandir('videos');
|
|
$videos = array_diff($videos,array('.','..','README.txt','descriptions'));
|
|
|
|
foreach($videos as $video)
|
|
{
|
|
$path_parts = pathinfo($video);
|
|
|
|
$filename = $path_parts['filename'];
|
|
|
|
$myvideo= ["tia_type" => "video", "tia_data" => ["tia_title" => $filename ,"tia_id" => $filename, "tia_filename" => $filename.".mp4", "tia_download_url" => "https://myholyvids.site.tesses.net/videos/".rawurlencode($filename).".mp4", "tia_description_type" => "html", "tia_description" => file_get_contents("./videos/descriptions/".$filename.".html"), "tia_creator_id" => "7f286552-118e-4496-bd4c-8876c9cc7b96"]];
|
|
|
|
array_push($tia_content,$myvideo);
|
|
|
|
}
|
|
$json_data = [
|
|
"tia_site_name" => "My Holy Vids",
|
|
"tia_site_root" => "https://myholyvids.site.tesses.net/",
|
|
"tia_content" => $tia_content
|
|
];
|
|
|
|
echo json_encode($json_data);
|
|
|
|
?>
|