Main Contents

PHP Force Download :: Fixing Safari Download Header Issues

October 26, 2007

Problem:
We’d got this client requesting a download script written in PHP. The Script should be able to run in Mozilla Firefox, MS IE, and Safari. Sounds simple enough right? I mean this could simply be done by just sending the following headers:

header(“Pragma: public”);
header(“Expires: 0″);
header(“Cache-Control: must-revalidate, post-check=0, pre-check=0″);
header(“Cache-Control: private”,false);
header(“Content-Transfer-Encoding: binary”);
header(“Content-Type: video/x-ms-wmv”);
header(“Content-Length: “.@filesize($filepath));
header(“Content-Disposition: attachment; filename=\”".$filename.“\”;”);

We’ve been using this header to force browser to download contents since day one. We thought nothing was wrong with it. That’s before we tested it with Safari. For some reason Safari just displays a blank white page. No error messages no nothing.

Solution:
(more…)

Filed under: PHP, Safari | Comments (2)
Related Links:

net time \\[workstation] /set /yes :: Synchronizing Network Time

October 25, 2007

Problem:
We’ve got this parent company up in India, we’re in the Philippines and they would like us to sync with the time they’re using on their servers in India. You would normally assume that in these days people would be using NTP (Network Time Protocol) servers and use the generally accepted time. That’s before we check the servers’ time. The time on their servers are about 12 to 15 minutes late from the rest of the world. Wow! Maybe that’s the reason why their record books shows that they come early to work.

Solution:
(more…)

Filed under: MS DOS | Comments (0)
Related Links:

Hello world!

October 24, 2007

Hello world! Don’t you just love it! The first indication that your program is alive.

[Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!]

Filed under: General | Comments (1)
Related Links: