Ok first, you're trying to remove the IP address from the ecard? If so just take out the part in bold:
"Sent by $sender_name from
IP {$_SERVER['REMOTE_ADDR']} at ".gmstrftime("%A, %B,%V,%Y %I:%M %p ", time())." [GMT]"
and replace with:
{$_SERVER["HTTP_HOST"]}
Cut and past the following code for the complete line:
$message .= "Sent by $sender_name from {$_SERVER["HTTP_HOST"]} at ".gmstrftime("%A, %B,%V,%Y %I:%M %p ", time())." [GMT]";Changes output from:
Sent by
USERNAME from
IP xxx.xxx.xxx.xxx at long date of server
To =>:
Sent by
USERNAME from
www.domian.com at long date of server
This IP that you're changing is the IP of the sender's computer. You could send the host IP, but that's not really nesseciary.
gethostbyname ($SERVER_NAME)** normally you want some way to handle abuse issues. Having the IP of the sender helps if people are being spammed from your site. They can contact you with the IP info and date stamp... allowing you to resolve the problem. I think this should be a little more descriptive than it is currently. Such as giving a disclaimer with this info listed, but the general reason for this line for troubleshooting or abuse issues.
If you want a complete solution, complete with clickable links, cut and paste the following code:
$sendToday = date("F j, Y, g:i a");
$tempDomain = $_SERVER["HTTP_HOST"];
$tempEmail = explode(".", $tempDomain);
$tempEmail = "abuse@" . $tempEmail[1] . "." . $tempEmail[2];
$message .= "Sent by $sender_name [<a href=\"mailto:$sender_email\">$sender_email</a>] from <a href=\"$tempDomain\" target=\"blank\">$tempDomain</a> at $sendToday <br>";
$message .= "<strong>IMPORTANT:</strong> If you believe this to be spam please email the site admin: <a href=\"mailto:$tempEmail\">$tempEmail</a><br>";
$message .= "Include these details $sender_name, $sender_email, {$_SERVER['REMOTE_ADDR']}, $sendToday";*updated code to fix timestamp bug
Outputs:
Sent by username (
user@email.com) from
www.domain.com at time stamp
IMPORTANT: If you believe this to be spam please email the site admin:
abuse@domain.comInclude these details username, user@email.com, xxx.xxx.xxx.xxx, time stamp