Skip to content

Instantly share code, notes, and snippets.

@Padilo300
Created August 18, 2020 13:16
Show Gist options
  • Save Padilo300/f4b96a158478360680cd824e55b58a7d to your computer and use it in GitHub Desktop.
Save Padilo300/f4b96a158478360680cd824e55b58a7d to your computer and use it in GitHub Desktop.
mime type base64
<?php
$link = 'https://padilo.bitrix24.ru/bitrix/components/bitrix/crm.deal.show/show_file.php?auth=9fda3b5f0000071b003ea674000000010000032e4b9b99d6daca9cdb7447656f005971&ownerId=12&fieldName=UF_CRM_1597745815052&dynamic=Y&fileId=150';
$file = file_get_contents($link);
$f = finfo_open();
$mime_type = finfo_buffer($f, $file, FILEINFO_MIME_TYPE);
echo "<pre>";
var_dump($mime_type);
echo "</pre>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment