A download script and statcounter working together without opening a new page
I have this download script running that allows people to click on a link
and download a file without any new html pages popup. It all works well.
<?php
header('Content-disposition: attachment;
filename=brochure-company-details.pdf');
header('Content-type: pdf');
readfile('brochure-company-details.pdf');
?>
However, I really want to be able to run the statcounter script so as to
document who is downloading the file. Statcounter is easy enough to run
when you have a html document open and run in a browser. But what I was
hoping to do is not have a page open. The user experience will be only to
have the file start to download.
Can you help?
No comments:
Post a Comment