How to? Send an email to myself, if someone clicks a link.

Discussion in 'HTML & Website Design' started by Huo_Yang, Aug 6, 2007.

  1. #1
    Hi.

    I want to make a simple solution for myself to report dead links (streams), and I want to have it like, if someone clicks the link (report a dead stream), an email will be send to me automaticly with my pre-added message ect. I don't need it with database or anything complicated, I want to set up this link seperatly (manually) for every stream.

    But I have no idea how to make it, could someone give me a tip, for the php, or html ect.!?

    p.s.: sorry for my bad English!
     
    Huo_Yang, Aug 6, 2007 IP
  2. euler

    euler Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Use this code in your 404 error page
    <?php
    $to="yourmail@dest.com";
    $obj="mail object";    // insert here your message
    $text="mail text";
    mail($to, $obj, $text);
    ?>
    PHP:
     
    euler, Aug 6, 2007 IP
  3. Huo_Yang

    Huo_Yang Peon

    Messages:
    250
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks!

    works perfect
     
    Huo_Yang, Aug 6, 2007 IP