Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2007
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    get name from linkedin website and use it to send in email based on URL

    Hello,

    I developed a snippet of code to originally use for a landing page and prepoulated form.

    I am now reusing this code to capture who visits my site based on an email invite.

    Below is the code I use; the end result of the code is to send me an email when the person I had sent an email to has clicked on the link to visit my site...

    I would send them a link by email (inviting them to view my site). The URL looks like this:

    http://www.mysite.com/index.php?firs...com&op=contact

    When they click on the link, I receive an email that looks like this:

    ----

    Michael,

    John Smith of ACME is viewing your online portfolio.

    His/Her contact information is:

    Name: John Smith
    Company: ACME
    Email: jsmtih@acme.com

    -----

    Below is the code I use:

    Code:
    <?php
    
    // Change these two variables to meet your needs.
    
    $myemail = 'myemail@mysite.com';
    $subject = 'Portfolio Viewing ALERT - You An Online Visitor';
    $emailrn = 'myemail@mysite.com';
    $firstname = $_GET[first];
    $lastname = $_GET[last];
    $company = $_GET[company];
    $position = $_GET[position];
    $email = $_GET[email];
    $id = $_GET[id];
    $op = $_GET[op];
    if($op == 'contact')
    {
        if(!$status)
        {
            $header = "From: $emailrnReply-To: $emailrn";
            $message = "Michael,
    		
    $firstname $lastname of $company is viewing your online portfolio.
    
    His/Her contact information is:
    
    Name: $firstname $lastname
    Company: $company
    Email: $email";
    
            if(mail($myemail, $subject, $message, $header))
            {
                $status = "Has been approved.<br><br>";
            }
    
        }
    }    
    ?>

    I would like to expand this code to do the following:

    I would like to create a URL that I can post into my "add your website" in my "LinkedIn" profile page. That is not the issue...my dream is to somehow get the persons name who clicked the "view website" and have it be sent to me through the php email. Can this be done? The image below is where I would like the link to be.



    I do not know how to capture the persons name (they would need to be logged into their account to view my full profile)...not even sure if it can be done; but wouldn't it be nice?

    Thanks

  • #2
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    Unless you have access to the linked in websites data you cannot do this no
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)


  •  

    Posting Permissions

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