Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $whole = explode("?",$_SERVER['REQUEST_URI']);
- $p = explode("/",$whole[0]);
- parse_str($whole[1], $_GET);
- array_shift($p);/*
- //demo:
- if($p[0] == '1a'){
- echo "1a";
- array_shift($p);
- if($p[0] == '2a'){
- echo '2a';
- array_shift($p);
- if($p[0] == '3a'){
- echo '3a';
- }
- }
- if($p[0] == '2b'){
- echo '2b';
- array_shift($p);
- }
- }*/
- if($p[0] == 'watch'){
- include('youtube.php');
- $id = $_GET['v'];
- $seconds = getYoutubeDurationInSeconds($id);
- if($seconds <= 0){die("error id");}
- $snippet= getYoutubeSnippet($id);
- $var['title'] = $snippet['title'];
- $format = ($seconds > 60*60)?"H:i:s":"i:s";
- $var['scale']['start']='00:00';
- $var['scale']['end']=gmdate($format, floor($seconds * 5 / 5));
- $var['related']=getRelatedVideos($id);
- //render('template/watch',$var);
- include('view.php');
- exit;
- }
- exit;
Add Comment
Please, Sign In to add comment