1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Send this Page to your friend script

Discussion in 'PHP' started by ruberr2002, Aug 7, 2010.

  1. #1
    Are there any good free 'Send this Page to Your Friend' scripts available? I found some but they open in another page.
    I like the one which is on the search page of Indeed dot com. (See attached). Small fast.
    Thanks in advance for your help.
     

    Attached Files:

    ruberr2002, Aug 7, 2010 IP
  2. themullet

    themullet Member

    Messages:
    110
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #2
    make the form, post it to your script

    for your script take a mail script, check both are email address, grab the refer link and send
     
    themullet, Aug 7, 2010 IP
  3. arpit13

    arpit13 Well-Known Member

    Messages:
    294
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    128
    Digital Goods:
    1
    #3
    i can make it for an itrader .

    pm me if you want.
     
    arpit13, Aug 7, 2010 IP
  4. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #4
    I'm not sure how I should do it, but it should be something like this:

    Save as 'sendfriend.php':
    
    <?php
    if(!defined("SENDFRIEND")) die("Not allowed.");
    $page = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];
    
    if(isset($_POST['from'], $_POST['to'])) {
       $from = $_POST['from'];
       $to   = $_POST['to'];
       $msg = "$from sent you this page link: $page";
       $headers = "From: $from";
       
       if(mail($to, "Your friend sent this page!", $msg, $headers)) echo "Successfully sent!";
       else "Failed.";
    }
    
    ?>
    
    <form action="" method="POST">
       <h4>Send this Page to Your Friend</h4>
       From this email address:<br />
       <input type="text" name="from" /><br />
       To this email address:<br />
       <input type="text" name="to" /><br />
       <input type="submit" value="Submit!" />
    </form>
    
    PHP:
    Make sure you define and include it in your PHP file (the page you wanna send) like this:
    
    define("SENDFRIEND",TRUE);
    include 'sendfriend.php';
    
    PHP:
     
    Last edited: Aug 8, 2010
    Rainulf, Aug 7, 2010 IP