Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run script after file download

Status
Not open for further replies.

geebers

Technical User
May 29, 2009
20
US
i need my php script to exectute once a file has been requested/downloaded by anyone. I'm new to apache config. Perhaps there's a directive for this? thanks for any help.
 
Here's what I've setup.....

in httpd.conf ive added:
<IfModule actions_module>
Action image/jpg /cgi-bin/myscript.cgi
</IfModule>

myscript.cgi looks like:
#!/bin/sh
echo "Success" >/opt/lampp/htdocs/project/success.txt

can't seem to write success.txt when a jpg image is requested.
BTW, i'm running latest version of xampp on linux.
Thanks for any help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top