mv_embed_iframe();
function mv_embed_iframe() {
- if(!function_exists('filter_input')){
- die('your version of php lacks <b>filter_input()</b> function</br>');
- }
- //default to null media in not provided:
- $stream_name = ( isset($_GET['sn']) )? $_GET['sn'] : die('no stream name provided');
- $time = ( isset($_GET['t']) )? $_GET['t']: '';
- $width = ( isset($_GET['width']) )? intval( $_GET['width'] ) : '400';
- $height = ( isset($_GET['height']) )? intval( $_GET['height'] ) : '300'; //
-
+ if( !function_exists( 'filter_input' ) ){
+ die( 'your version of PHP lacks <b>filter_input()</b> function<br />' );
+ }
+ // default to null media in not provided:
+ $stream_name = ( isset( $_GET['sn'] ) )? $_GET['sn'] : die('no stream name provided');
+ $time = ( isset( $_GET['t'] ) )? $_GET['t']: '';
+ $width = ( isset( $_GET['width'] ) )? intval( $_GET['width'] ) : '400';
+ $height = ( isset( $_GET['height'] ) )? intval( $_GET['height'] ) : '300'; //
+
$roe_url = 'http://metavid.org/wiki/Special:MvExportStream?feed_format=roe&stream_name=' . htmlspecialchars( $stream_name ) .
'&t=' . htmlspecialchars( $time );
- //everything good output page:
+ //everything good output page:
output_page(array(
'roe_url' => $roe_url,
'width' => $width,
'height' => $height,
));
}
-function output_page($params){
+function output_page( $params ){
extract( $params );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" src="mv_embed.js"></script>
</head>
<body>
- <video roe="<?php echo $roe_url ?>" width="<?php echo htmlspecialchars( $width )?>"
- height="<?php echo htmlspecialchars( $height )?>"></video>
+ <video roe="<?php echo $roe_url ?>" width="<?php echo htmlspecialchars( $width ) ?>"
+ height="<?php echo htmlspecialchars( $height ) ?>"></video>
</body>
</html>
-<?
+<?php
}
/**
"\xe2\x80\x8d" => "\\u200d", // ZERO WIDTH JOINER
);
return strtr( $string, $pairs );
-}
-?>
+}
\ No newline at end of file