PDA

View Full Version : Email notification when site accessed or file downloaded


Meers
07-12-2004, 04:20 PM
Hi,

Is it possible to set a script so that when my site is accessed I will receive an email notification?

Or when a file is downloaded?

I'd like the email to list who accessed it by name & IP address

Would this be possible?

thanks
meers

oracleguy
07-12-2004, 07:54 PM
Sure with a server-side language like PHP or ASP you could. But your inbox could get pretty full, quick if you did.

Meers
07-12-2004, 08:02 PM
Yeah I understand about the pretty full pretty quick thought.

Its mostly for hidden files etc where I would notify someone there is something waiting for them and they need to pick it up.

Or else a file that only a few should have access too, but that I'd like to know they did get to it...

Any idea on how I could search for a script on it?

I'm very green when it comes to PHP, asp

thanks

oracleguy
07-12-2004, 08:03 PM
Well, first question... which is it going to be? ASP or PHP? What does your host support?

Meers
07-12-2004, 08:12 PM
LOL

Both

I'm MOST familiar with PHP (been 'learning' about it and trying it 'moderately successful so far' for about a week now!)

but either is fine, which ever would be easiest... simplist

Willing, eager and trying to learn

Thanks

oracleguy
07-12-2004, 08:17 PM
Well with PHP, it is as simple as using the mail() function (http://us2.php.net/manual/en/function.mail.php).

You just put the PHP code at the top of which every page you want it to send mail for and there ya go. That'd be the simplist, no frills, way to do it.