volle dateinamen

master
Chris 3 years ago
parent 0eaf8f0947
commit c8431f66d4
  1. 12
      getPreview.php

@ -68,6 +68,16 @@ function getFileExtention($uri)
return $parts[(count($parts)-1)];
}
function getFullNumberString($number)
{
while(strlen($number) <= 6)
{
$number = "0".$number;
}
return $number;
}
while(true)
{
$streamInfo = getStreamInfo($globalData['Channel']);
@ -83,7 +93,7 @@ while(true)
}
$imageFileName = $globalData['Folder'].(getFileCountInFolder() + 1).".".getFileExtention($previewURL);
$imageFileName = $globalData['Folder'].getFullNumberString((getFileCountInFolder() + 1)).".".getFileExtention($previewURL);
echo "Copy preview url '".$previewURL."' to '".$imageFileName."' ...";
file_put_contents($imageFileName, file_get_contents($previewURL, false, $globalData['sslContext']));

Loading…
Cancel
Save