Archive for September, 2008
Bug with Adobe Flash on Mac when uploading files to a redirected URL
Just spent almost the entire day trying to figure out what I was doing wrong when trying out many different flash multi-file uploading widgets. All of them would give me a 302 redirect http error, even when testing locally.
So after much searching and reading and studying… and finally testing this on my Windows machine (which [...]
Redirect all but used subdomains to primary domain using mod_rewrite and CodeIgniter
I was recently playing with mod_rewrite and wanting a couple of subdomains to act as subdomains, but all others to redirect back to my site without the leading “www”. For example:
www.example.com => example.com
bad.example.com => example.com
api.example.com => api.example.com
Not being a regular expression or mod_rewrite expert (or any resemblance of such), this was a bit of a [...]
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 />
[...]