Jump to content

Pghmediaking

New Members
  • Posts

    2
  • Joined

  • Last visited

Pghmediaking's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. So I posted this topic some time ago, roughly a month, and not one person responded. Is this what is to be expected from this online community. I am looking for a site that helps new developers learn while also contributing when I can. This had almost 50 views and not one response.
  2. I am new to PHP so bare with me but I am trying to display videos based on a date range without using a database. The videos are independently housed inside individual .php files that I am using as includes. Can anyone take a look into what Im doing so that I can figure out if my techniques is correct. Below is the coding that I have completed: --------------------------------------------------------------------------------------------------------------------- The include files are setup in this manor: video_name1.php contains this coding(as do all the other include files: <video width="640" height="480" controls> <source src="media/ogg/easter_720x480.ogv" type="video/ogg"> <source src="media/mp4/easter_720x480.mp4" type="video/mp4"> <source src="media/webm/easter_720x480.webm" type="video/webm"> <source src="media/wmv/easter_720x480.wmv" type="video/wmv"> <object data="movie.mp4" width="640" height="480"> <embed width="640" height="480" src="media/player.swf"></embed> </object> </video> --------------------------------------------------------------------------------------------------------------------- My php constructed to complete the task: <?php $video_name1="includes/video_name1.php"; $video_name2="includes/video_name2.php"; $video_name3="includes/video_name2.php"; $video_name4="includes/video_name2.php"; $video_name5="includes/video_name2.php"; $video_name6="includes/video_name2.php"; ?> <?php date_default_timezone_set('America/New_York'); $today = strtotime(date('Y-m-d')); $startApr = strtotime(date('Y') . '-04-01'); $endMay = strtotime(date('Y') . '-5-31'); $startJune = strtotime(date('Y') . '-06-01'); $endJuly = strtotime(date('Y') . '-7-31'); $startAug = strtotime(date('Y') . '-08-01'); $endSept = strtotime(date('Y') . '-9-30'); $startOct = strtotime(date('Y') . '-10-01'); $endNov = strtotime(date('Y') . '-11-30'); $startDec = strtotime(date('Y') . '-12-01'); $endJan = strtotime(date('Y') . '-1-31'); $startFeb = strtotime(date('Y') . '-2-01'); $endMarch = strtotime(date('Y') . '-3-31'); if($today >= $startApr && $today <= $endMay) { include($video_name1); } else if($today >= $startJune && $today <= $endJuly) { include($video_name2); } else if($today >= $startAug && $today <= $endSept) { include($video_name3); } else if($today >= $startOct && $today <= $endNov) { include($video_name4); } else if($today >= $startDec && $today <= $endJan) { include($video_name5); } else if($today >= $startFeb && $today <= $endMarch) { include($video_name6); } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.