Mailing PHP time stamp
Posted: Thu Nov 01, 2007 1:58 pm
scottayy | Please use
scottayy | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
[color=red]***** PLEASE ENABLE BBCODE AND USE IT WHEN POSTING CODE *****[/color]
I am trying to send date and time stamp info from server, but it arrives as a string. I have tried different syntax but can't figure this out. The $_SERVER['REMOTE_ADDR' does send the IP address. What am I missing?Code: Select all
//Send email to email address
$to = "email@email.com";
$subject = "SUBJECT";
$message = "Date: date('l, F jS, Y') \nTime: Web Server Time: date('g:i:s A')\nIP address: {$_SERVER['REMOTE_ADDR']}";
$from = "email@email.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);scottayy | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]