Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Determine what website client was on
3 points by ge96 on April 11, 2017 | hide | past | favorite | 5 comments
I don't know why I'm not sure if you can do this.

I just want to know for analytics purpose where a connecting client came from. Is that something you would know from say HTTP?

I use PHP right now for backend. I can get IP/requested URL, I just for some reason assumed you can do this. I mean if you think about Google they are running a browser so this information is probably easy to get/makes sense to have.

But I mean when you leave one server, how would another server know which server you were just connected to?





Thanks


Use something like https://goaccess.io


In PHP, you're looking for

  $_SERVER['HTTP_REFERER']


Nice! I saw this in a StackOverflow post, it's odd that it would work that way don't you think? (probably not) but I think say you are A, and you connected to B (Facebook) and you then connect to C (YouTube), why would you not see A instead of seeing B at C?

Anyway thanks




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: