Skip to content
Permalink
Browse files

Merge pull request #589 from tarasfrompir/patch-2

добавлена функция проверки наличия файла
  • Loading branch information...
sergejey committed Jul 23, 2019
2 parents ae2f1e9 + dd42a32 commit 9c4c5ccaaea0d769fa3c5e7f7312baee83d805c9
Showing with 10 additions and 0 deletions.
  1. +10 −0 lib/common.class.php
@@ -1449,3 +1449,13 @@ function seekPlayerPosition($host = 'localhost', $time = 0)
return $player->json['message'];
}
function remote_file_exists($url){
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if( $httpCode == 200 ){return true;}
return false;
}

0 comments on commit 9c4c5cc

Please sign in to comment.
You can’t perform that action at this time.