JudyO
Newbie
- Dec 3, 2011
- 10
- 0
I'm trying to identify where my customers are coming from via emails I've sent/received. However, many email providers (namely Gmail) have circumvented this by disallowing geolocation/caching.
When they click on the link in the email, it would direct them to an offer (page on my website). At the same time, the PHP script would be writing their details to a log.txt file on my server.
I've figured out how to log their IP address (if they click on the email sent), but would like to tie it back to their email address, OS & browser as well. Being a PHP neophyte, I'm not sure how to code it for those parameters.
Below is as far as I could get. Can you puhleeeze help me out here?
--
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$dt = date("l dS \of F Y h:i:s A");
$email = email
$os = os
$browser = browser
$file=fopen("ip_log.txt","a");
$data = $ip.' '.$dt."\n" $email.' ' $os ' ' $browser ' ';
fwrite($file, $data);
fclose($file);
header( 'location http www myserverdotcom webpageofferdothtml' ) ;
?>
When they click on the link in the email, it would direct them to an offer (page on my website). At the same time, the PHP script would be writing their details to a log.txt file on my server.
I've figured out how to log their IP address (if they click on the email sent), but would like to tie it back to their email address, OS & browser as well. Being a PHP neophyte, I'm not sure how to code it for those parameters.
Below is as far as I could get. Can you puhleeeze help me out here?
--
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$dt = date("l dS \of F Y h:i:s A");
$email = email
$os = os
$browser = browser
$file=fopen("ip_log.txt","a");
$data = $ip.' '.$dt."\n" $email.' ' $os ' ' $browser ' ';
fwrite($file, $data);
fclose($file);
header( 'location http www myserverdotcom webpageofferdothtml' ) ;
?>