Jump to content

headers / content-type


noon

Recommended Posts

I am going to make a file available for download (a Firefox extension) but I want a simple way of recording how many times this particular file has been hit.  So, using the following code I can keep track:

increment_hits();

header("Content-Type: application/x-xpinstall");	
readfile('extensiondev.xpi');

 

Now, this is probably an apache question, but I figure you guys would know.  I want this to be transparent to the users.  How can I make this php file actually take on the extension .xpi and have my apache server handle it, using strictly an .htaccess file?

Link to comment
https://forums.phpfreaks.com/topic/108826-headers-content-type/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.