Click to See Complete Forum and Search --> : IP capture
stickleback
01-09-2009, 01:00 PM
I have a client who is keen to capture the IP addresses of visitors to his site so as to be able to follow up their visit with an email (probably automated) later. Can anyone point me in the right direction for this - I'm guessing its php but am not sure - I'm also not sure what it is exactly that I'd be "capturing" and how to go about using it later on.
In fact I know next to nothing other than my client thinks this should be something simple.........
PrintDriver
01-09-2009, 01:52 PM
Bearing in mind that my only experience with IP addresses is as a mod here, if the visitor has a dynamic IP rather than a static one, you might find you can't resolve it to any one service provider IP block. And then, if it's a visitor with a firewall or router, you will never really know who to send back to at that company.
In fact, except in very few instances, I'm not so sure you can resolve an email addy from an IP.
Wiser minds than mine will be along, I'm sure.
shalom_m
01-09-2009, 01:56 PM
There are dozens of JS, PHP, CGI routines that do this. You can google for them.
However this will not really help your client in sending them an e-mail.
CkretAjint
01-09-2009, 02:19 PM
I was going to say, you can't email an IP address. You will still need the person email address to send something out to them. Plus if you are like me, you have 2 computers at work, 2 at home and any number of friends computers I have access too. So *my* IP address can very vastly depending upon which day of the week I am looking at your clients site. And if I got the same email over and over again just cause I used a different computer, I would go batty...
Virgo Nightingale
01-09-2009, 02:41 PM
Plus you could have several email addresses emanating from the same IP address. My husband and I share one computer at home with one IP address. We each have at least 2 different email addresses. Who gets the email? Plus, just because someone's IP address suggests that they use a particular service provider, it doesn't mean they use that service for their email. Someone using Optimum cable might use a hotmail or google account for most of their email.
Craig B
01-09-2009, 02:50 PM
I agree with everyone else ... obtaining and email based on an IP probably is not a good approach if it's even doable.
digizan
01-09-2009, 03:47 PM
An IP address is used to identify a device on a network. There is no way to resolve an IP address to a specific visitor's email account. If that could be done, spammers would be in 7th heaven.
To elaborate on what others have said (in case your client asks for an explanation):
Using PHP as an example, you could capture a visitor's IP address and then have it do a reverse DNS lookup, but that's only going to give you the remote host. The remote host would be the gateway through which the visitor connects to the internet—e.g. a server belonging to an ISP, corporation, government, educational entity, etc.
If you go to http://www.ipchicken.com/ you can see an IP capture & reverse DNS lookup in action. It will tell you your IP address and the name of the server through which you are visiting the site, along with the port number and your browser info.
You might want to explain to your client that his best bet would be to provide visitors with a way to voluntarily sign up to be on his mailing list, always giving them the ability to opt out at any time. Unsolicited email from him would be considered spam and could result him ending up on one or more blacklists (http://spamlinks.net/filter-bl.htm).
Should he end up on on the blacklist of major ISPs, it could have serious repercussions. Not only might his regular business emails not reach their intended recipients (because the spam filters on the ISP's servers would likely delete them before they ever reached the user), but his own hosting company and/or ISP might suspend his account as the entire domain/IP might be blacklisted (thereby affecting everyone who uses it). Once on a blacklist, it can be difficult to get removed.
Digi
xc-runner
01-09-2009, 04:41 PM
If you want to send a contextual email based on where the user was browsing or what they were doing you would probably want to combine IP with a cookie or session data.
Of course, you'd need them to register or log in to the site to match that to the users email.
stickleback
01-09-2009, 09:40 PM
wow - thanks for all the replies.
Truth is the comments about spammers in heaven rang very true since my first thought was that if it were possible it would be much more common.
I have some arguments to go back with so many thanks.....
Your best bet would be to store their name and email in the database, but this would require a registration form and back end set up. Going back to your question though a IP address from the $_SERVER array in php is never 100% in the first place.
Pointyhat
01-10-2009, 05:48 AM
It sounds very intrusive, like telemarketers calling you at home.
PrintDriver
01-10-2009, 09:42 AM
If you're on the internet, nothing is private any more.
Pointyhat
01-10-2009, 09:52 AM
I still think marketing through ISPs is intrusive.
PrintDriver
01-10-2009, 10:13 AM
It is. But usually an ISP holds its client/IP/history linkages confidential under its Privacy Policy. You read those, right? ;)
Heaven help us if the day ever comes that ISPs can make public all the info they gather about you while you are connected to them. THEY truly know who you are and no deleted cookies or history or computer wipe is gonna help you. :)