Hi Everyone,
I have a simple PHP script that sends a message to a specified email address with content from a HTML form using the mail() function (which I am aware is prone to spam).
I was wondering if it's possible to obtain additional information about the user's settings and input them in the sent mail.
Additional information could contain:
- Browser type and version Whether
- Javascript is enabled or disabled
- Operating system Resolution
If any of those are possible, that would be awesome.
Thanks, Amit
EDIT: Thanks to @Stephen, I was able to use the $_SERVER['HTTP_USER_AGENT'] to get more info regarding the browser. However, when using the get_browser, it did not work. This is my code:
$browser = get_browser(null, true);
$message = 'From: ' . "\n\n" .
'Name: ' . $_REQUEST['name'] . "\n\n" .
'E-mail: ' . $_REQUEST['email'] . "\n\n" .
'Comments: ' . $_REQUEST['comments'] . "\n\n" .
'Details: ' . $_SERVER['HTTP_USER_AGENT'] . "\n\n" .
'Further: ' . echo ($browser);
Anyone knows the reason why?
Thanks!