SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2001
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Visitor Alert Script

    Hi - Does anyone know of a quick and easy script that I can place on one of my pages that will email me anytime the page is requested? I tried (with my limited to non-existent php skills) to edit a similar script designed for GoogleBot but had no luck.

    Any help would be great!
    ---no sig here---

  2. #2
    Who turned the lights out !! Mandes's Avatar
    Join Date
    May 2005
    Location
    S.W. France
    Posts
    2,496
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yep

    PHP Code:
    <?
    //send email that website is viewed 
     
    $timezone = +1// Write time and date
     
    $timestamp 'Viewed at ' gmdate("F d, Y H:i:s"time() + 3600*($timezone+date("I")));
     
    $sendto  'youremailadress' ;
     
    $subject 'Website viewed' ;
     
    $message 'The website has been viewed <br />' $timestamp;
     
    $message wordwrap($message65);
     
    $headers "";
     
    $headers  'MIME-Version: 1.0' "\r\n";
       
    $headers .= 'Content-type: text/html; charset=iso-8859-1 ' "\r\n";
        
    $headers .= 'X-Priority: 3' "\r\n";
        
    $headers .= 'X-MSMail-Priority: Normal' "\r\n";
        
    $headers .= 'X-Mailer: php' "\r\n";
        
    $headers .= 'From: websitemonitor' "\r\n";
     
    mail($sendto$subject$message$headers);
    // end of email send
    ?>
    A Little Knowledge Is A Very Dangerous Thing.......
    That Makes Me A Lethal Weapon !!!!!!!!

    Contract PHP Programming

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2001
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, you are the MAN-des!!
    ---no sig here---

  4. #4
    Who turned the lights out !! Mandes's Avatar
    Join Date
    May 2005
    Location
    S.W. France
    Posts
    2,496
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No problem
    A Little Knowledge Is A Very Dangerous Thing.......
    That Makes Me A Lethal Weapon !!!!!!!!

    Contract PHP Programming


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •