mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
parent
95024e556a
commit
c5c8e6fd79
1 changed files with 9 additions and 2 deletions
|
@ -30,7 +30,14 @@ foreach ($videos as $value) {
|
||||||
$duration = (Video::getItemDurationSeconds(Video::getDurationFromFile($videoPath)) / 2);
|
$duration = (Video::getItemDurationSeconds(Video::getDurationFromFile($videoPath)) / 2);
|
||||||
if (!empty($videosURL)) {
|
if (!empty($videosURL)) {
|
||||||
$url = $videosURL;
|
$url = $videosURL;
|
||||||
$file_headers = @get_headers($url);
|
$context = stream_context_create([
|
||||||
|
'ssl' => [
|
||||||
|
'verify_peer' => false,
|
||||||
|
'verify_peer_name' => false,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$file_headers = @get_headers($url, 0, $context);
|
||||||
if (!$file_headers || $file_headers[0] == 'HTTP/1.1 404 Not Found') {
|
if (!$file_headers || $file_headers[0] == 'HTTP/1.1 404 Not Found') {
|
||||||
echo "\nGet webp not found {$url}";
|
echo "\nGet webp not found {$url}";
|
||||||
ob_flush();
|
ob_flush();
|
||||||
|
@ -48,7 +55,7 @@ foreach ($videos as $value) {
|
||||||
echo "\nGet done";
|
echo "\nGet done";
|
||||||
ob_flush();
|
ob_flush();
|
||||||
} else {
|
} else {
|
||||||
echo "\nFile exists: " . $value['title']. " {$destination}";
|
echo "\nFile exists: " . $value['title'] . " {$destination}";
|
||||||
ob_flush();
|
ob_flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue