i wanna add simple function in a script such as online video stream for mobile in realplayer reply here
Earn 50 usd
Collapse
X
-
Ya online video streming in mobile
Added after 5 minutes:
PHP Code:<!-- Design By PREM, [email]premjatt@gmail.com[/email] --><?php ;/*:PREM: function format_size()this function convert size fromBYTES to KB, MB, GB, TBand return:Prem:*/function format_size($size, $round = 2) {$sizes = array('Byts', 'kb', 'mb', 'gb','TB');$total = count($sizes)-1;for ($i=0; $size > 1024 && $i < $total; $i++) $size /= 1024;return round($size,$round).$sizes[$i];}if($_REQUEST['file'])$file = $_REQUEST['file'];// calling function to get file listsif(is_file($file)){/*Prem:: printing file list to screen*/echo "<div class='my3'>» Download File:</div><div class='tCenter'>";if(substr($file,strrpos($file,'.')+1)=='jpg' || substr($file,strrpos($file,'.')+1)=='jpeg' || substr($file,strrpos($file,'.')+1)=='png'){echo "<img src=\"image.php?w=120&h=90&f=$file&q=70\" /><br />";}else{$thumb = str_replace(substr($file,strrpos($file,'/')+1),'thumb-'.substr($file,strrpos($file,'/')+1),$file);$thumb = substr($thumb,0,strrpos($thumb,'.')).'.jpg';if(is_file($thumb)){echo "<img src='$thumb' width=70 height=90 /><br/>";}}echo str_replace('(www.spicyfm.com)','',substr($file,strrpos($file,'/')+1))." (".format_size(filesize($file)).")";// for imageif(substr($file,strrpos($file,'.')+1)=='jpg' || substr($file,strrpos($file,'.')+1)=='jpeg' || substr($file,strrpos($file,'.')+1)=='png'){echo '<span class="imageLink">';echo '<a href="image.php?w=128&h=128&f='.$file.'"> 128 x 128</a>';echo '<br />';echo '<a href="image.php?w=128&h=160&f='.$file.'"> 128 x 160</a>';echo '<br />';echo '<a href="image.php?w=176&h=144&f='.$file.'"> 176 x 144</a>';echo '<br />';echo '<a href="image.php?w=176&h=208&f='.$file.'"> 176 x 208</a>';echo '<br />';echo '<a href="image.php?w=208&h=208&f='.$file.'"> 208 x 208</a>';echo '<br />';echo '<a href="image.php?w=240&h=320&f='.$file.'"> 240 x 320</a>';echo '<br />';echo '<a href="image.php?w=320&h=240&f='.$file.'"> 320 x 240</a>';echo '</span>';}echo "<div class='tCenter'><b><a href='".$file."'>Download Now</a></b></div>";echo '<div class="tCenter">';include('advertisement1.php');echo '</div>';}elseecho '<br/><h2>Error: wrong path entered.</h2><br/>';/*Prem:: Go back to parent dir*/echo '<div class="my3"><a href="index.php">» Home</a> <a href="index.php?dir='.substr($file,0,strrpos($file,'/')).'&start='.$_REQUEST['start'].'">» Back</a></div>';include('footer.php');?>
Last edited by arnage; 07.06.13, 08:05.HUNT
Comment
Comment