Skip to content

Instantly share code, notes, and snippets.

View emmanero90's full-sized avatar

Emmanuel Osasa emmanero90

View GitHub Profile
@emmanero90
emmanero90 / smartReadFile.php
Created April 22, 2024 08:00 — forked from benvium/smartReadFile.php
PHP File to allow seeking in HTML5 <audio> tag. NOTE: I did not write this, check links in code for credits.
<?php
/**
* Reads the requested portion of a file and sends its contents to the client with the appropriate headers.
*
* This HTTP_RANGE compatible read file function is necessary for allowing streaming media to be skipped around in.
*
* @param string $location
* @param string $filename
* @param string $mimeType
* @return void