|
|
|
@ -9,17 +9,22 @@ if (empty($type) || empty($src)) { |
|
|
|
|
api_not_allowed(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$iframe = ''; |
|
|
|
|
switch ($type) { |
|
|
|
|
case 'youtube': |
|
|
|
|
$src = 'http://www.youtube.com/embed/'.$src; |
|
|
|
|
$iframe = '<iframe class="youtube-player" type="text/html" width="640" height="385" src="'.$src.'" frameborder="0"></iframe>'; |
|
|
|
|
$iframe .= '<div id="content" style="width: 700px ;margin-left:auto; margin-right:auto;"><br />'; |
|
|
|
|
$iframe .= '<iframe class="youtube-player" type="text/html" width="640" height="385" src="'.$src.'" frameborder="0"></iframe>'; |
|
|
|
|
$iframe .= '</div>'; |
|
|
|
|
break; |
|
|
|
|
case 'vimeo': |
|
|
|
|
$src = 'http://player.vimeo.com/video/'.$src; |
|
|
|
|
$iframe = '<iframe src="'.$src.'" width="640" height="385" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'; |
|
|
|
|
$iframe .= '<div id="content" style="width: 700px ;margin-left:auto; margin-right:auto;"><br />'; |
|
|
|
|
$iframe .= '<iframe src="'.$src.'" width="640" height="385" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'; |
|
|
|
|
$iframe .= '</div>'; |
|
|
|
|
break; |
|
|
|
|
case 'nonhttps': |
|
|
|
|
$iframe = '<a href="' . $src . '" target="_blank">' . $src . '</a>'; |
|
|
|
|
$iframe = '<a href="' . $src . '" target="_blank" style="font-family: arial; color: #666;">' . $src . '</a>'; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
?> |
|
|
|
@ -30,9 +35,6 @@ switch ($type) { |
|
|
|
|
<title></title> |
|
|
|
|
</head> |
|
|
|
|
<body> |
|
|
|
|
<div id="content" style="width: 700px ;margin-left:auto; margin-right:auto;"> |
|
|
|
|
<br /> |
|
|
|
|
<?php echo $iframe; ?> |
|
|
|
|
</div> |
|
|
|
|
</body> |
|
|
|
|
</html> |
|
|
|
|