Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Notify by email  (Read 3204 times)

0 Members and 1 Guest are viewing this topic.

kas9

  • Guest
Notify by email
« on: June 03, 2008, 10:20:30 AM »
I am trying to set up a email notification if one of the pages on my website is visited. Is there some simple code to send a small message to an email address when a page is visited.

michaewlewis



    Intermediate
  • Thanked: 26
    • Yes
    • Yes
  • Experience: Expert
  • OS: Unknown
Re: Notify by email
« Reply #1 on: June 03, 2008, 11:14:31 AM »
to do that, you would need a php script in the page which, upon load, would use the mail() function to send the message.

soybean



    Genius
  • The first soybean ever to learn the computer.
  • Thanked: 469
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 10
Re: Notify by email
« Reply #2 on: June 03, 2008, 09:46:14 PM »
What type of info would this message contain?  Most web hosting services provide statistics on web traffic.  Would an email notification be much more useful? 

Computer Hope Admin

  • Administrator


  • Prodigy

    Thanked: 248
    • Yes
    • Yes
    • Yes
    • Computer Hope
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows 10
Re: Notify by email
« Reply #3 on: June 04, 2008, 10:39:20 PM »
If your web host doesn't supply you with statistics (or even if they do) I'd highly recommend Google Analyitics. By far the best website traffic monitor I've seen and it's 100% free, even for a large site such as Computer Hope.

http://www.google.com/analytics/
Everybody is a genius. But, if you judge a fish by its ability to climb a tree, it will spend its whole life believing that it is stupid.
-Albert Einstein

michaewlewis



    Intermediate
  • Thanked: 26
    • Yes
    • Yes
  • Experience: Expert
  • OS: Unknown
Re: Notify by email
« Reply #4 on: June 05, 2008, 09:07:16 AM »
they may be trying to set it up for a "secure" webpage.... or maybe so they can know when a friend made it through a maze of webpages to get to that one page. hmm. could be a cool game.

stevejohnson1958

  • Guest
Re: Notify by email
« Reply #5 on: June 05, 2008, 09:18:35 AM »
I don't understand why you'd want to do this....

To me...your inbox would be flooded with email...even if a bot visited it.

Why not just use the stats provided by your host to see how much activity this page is generating?

Astoria



    Intermediate

    Re: Notify by email
    « Reply #6 on: June 05, 2008, 10:30:56 AM »
    I agree with saviour, your inbox will be flooded.

    Why not create an "admin" page where you can see when, and by what IP adress the site (or even page) has been visited?
    All that would take is some PHP and a MySQL database and your set.

    That's the way I would do it.



    Computer Hope Admin

    • Administrator


    • Prodigy

      Thanked: 248
      • Yes
      • Yes
      • Yes
      • Computer Hope
    • Certifications: List
    • Computer: Specs
    • Experience: Guru
    • OS: Windows 10
    Re: Notify by email
    « Reply #7 on: June 05, 2008, 12:41:25 PM »
    A few years ago I wrote a wrote a Perl script that would text me each time a visitor hit a page. Got real annoying after the first day, especially at night. It's so much better to simply review logs. Although I may understand why you may do it. I created a script so I could know when a visitor was on a page and may need to chat. Unfortunately (although probably could of been adjusted) search engines frequently visited the page so in addition with high traffic to the page and search engines it really wasn't worth it.
    Everybody is a genius. But, if you judge a fish by its ability to climb a tree, it will spend its whole life believing that it is stupid.
    -Albert Einstein