diff options
Diffstat (limited to 'tools/init.php')
-rw-r--r-- | tools/init.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/init.php b/tools/init.php index 51d4ee8..095f43d 100644 --- a/tools/init.php +++ b/tools/init.php @@ -34,13 +34,13 @@ function url_exists( $url = NULL ) { } } -function video_exists($url) { - @$headers = get_headers($url); +function video_exists( $url ) { + @$headers = get_headers( $url ); $result = FALSE; - foreach ($headers as $hdr) { - if (preg_match('/^HTTP\/\d\.\d\s+(403)/', $hdr)){ + foreach ( $headers as $hdr ) { + if ( preg_match( '/^HTTP\/\d\.\d\s+(403)/', $hdr ) ) { $result = TRUE; // Found 403 Error } } @@ -51,18 +51,18 @@ function video_exists($url) { } } -function secToDuration($seconds){ - $minutes = intval($seconds/60); - $seconds = ($seconds - ($minutes * 60)); +function secToDuration( $seconds ) { + $minutes = intval( $seconds/60 ); + $seconds = ( $seconds - ( $minutes * 60 ) ); return $minutes . ' minutes ' . $seconds . ' seconds'; } -function bytes($a) { +function bytes( $a ) { $unim = array("","K","M","G","T","P"); $c = 0; while ($a>=1000) { $c++; $a = $a/1000; } - return number_format($a,($c ? 2 : 0),",",".")." ".$unim[$c]; + return number_format( $a,( $c ? 2 : 0 ),",","." )." ".$unim[$c]; } |