aboutsummaryrefslogtreecommitdiffstats
path: root/tools/init.php
diff options
context:
space:
mode:
Diffstat (limited to 'tools/init.php')
-rw-r--r--tools/init.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/init.php b/tools/init.php
index deb20e5..51d4ee8 100644
--- a/tools/init.php
+++ b/tools/init.php
@@ -36,12 +36,15 @@ function url_exists( $url = NULL ) {
function video_exists($url) {
@$headers = get_headers($url);
+
+ $result = FALSE;
+
foreach ($headers as $hdr) {
if (preg_match('/^HTTP\/\d\.\d\s+(403)/', $hdr)){
$result = TRUE; // Found 403 Error
}
}
- if ( $result = TRUE ) {
+ if ( $result === TRUE ) {
return FALSE; // Not exist video
} else {
return TRUE; // Exist video