I'm trying to post user IP address with link for tracking IP location, I have the below php code. I want to include user IP in the hyperlink link this http://whatismyipaddress.com/ip/108.44.33.225
<?php
if(isset($_POST['submit'])){
$to = "email@example.com";
$from = $_POST['email'];
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$ip=$_SERVER['REMOTE_ADDR'];
$subject = "Email IP submission as link";
$message = $first_name . " " . $last_name . " wrote the following:" . "
" . $_POST['message'];
$message .= "IP Address:" <a href="http://whatismyipaddress.com/ip/. $ip .">. $ip</a>";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent. Thank you ";
}
?>