I figured out from previous threads what lines I need to change to correct this in the email but I must admit my ignorance to the values.
How do I get this code:
message .= "Sent by $sender_name from IP {$_SERVER['REMOTE_ADDR']} at ".gmstrftime("%A, %B,%V,%Y %I:%M %p ", time())." [GMT]";
to output this
Sent by Send_Name on August 13, 2004
Is the IP supposed to be my host IP or my URL?
I would love if it could say:
Sent by Sender_Name from www.aupairhost.com
For example:
Sent by suzherm@aupairhost.com from www.aupairhost.com on August 13, 2004
I am struggling with the what to put here
IP {$_SERVER['REMOTE_ADDR']} at ".gmstrftime("%A, %B,%V,%Y %I:%M %p ", time())." [GMT]";
Right now, this is what comes out on ecards
Sent by tofindamber from IP on Friday, August,33,2004 07:17 PM [GMT]
I am trying to fix what is in bold
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.com
Include these details username, user@email.com, xxx.xxx.xxx.xxx, time stamp
Also check the bug fix here (http://forum.coppermine-gallery.net/index.php?topic=8234.msg36957;topicseen#msg36957). There is no 33rd August, I'm sure you already realised that. ;)
Thanks I fixed it, it slipped my mind and I just copied the old code I had for the timestamp... updated to a simplier form using date()
$sendToday = date("F j, Y, g:i a");
-T 8)