PHP
Converting Ticks to a Timestamp
I recently had to deal with a SQLite database that stored the timestamps as ticks. Having to first research what a tick is, I created a simple function that will convert a tick value to a timestamp or MySQL datetime value since I couldn’t find anyone else who had done such a thing yet.
You can [...]
Serving a large file through PHP without hitting memory_limit
Ran into a little problem hitting the memory limit for PHP when serving 100MB+ files through a script like:
$file = @fopen($filename,”r”);<br/><br />
if ($file)<br />
{<br />
while(!feof($file))<br />
{<br />
print(fread($file, 1024*4));<br />
[...]