问题原文
原帖链接 · TheShah1 · CC BY-SA 3.0
Essentially what I'm wanting to know is, if I set up my website to collect user IP addresses using a mysql database to see when they first visited + when they last visited and other info like what pages they have visited on my website, do I have to put a privacy policy to let the users know this is going on?
Also, do I have to provide proof of what it is their data will be used for?
To be more specific, this is my portfolio/blog that I'm making with this feature and I don't know if my efforts are worth it.
Thanks.
//This is the php code that grabs the IP address.
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
Also, I'm not associating their IP with who they are necessarily, but I'm using it to distinguish between 2 users because they may view different things.
Edit: This is for my professional portfolio/blog.
已采纳解答
原帖链接 · TopQnA · CC BY-SA 3.0
Generally, web servers store those details in a log file in anyways. Info like: IP Address, Time of Visit, Referal URL etc. So, in my view, it should be perfectly all right store and analyse these info based on the need.
Also, instead of coding, storing and analysing, i would recommend you to use Google Analytics which will give you greater details about user behaviour.
With regards to IP, there are other tools available (Like: Open Tracker) and you can integrate by placing their JS and it collects a massive amount of info with IP, page visit and much more.
Coding on your own may be an overhead unless there will be no option out there.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
