5 ms·
Ask HN: Determine what website client was on
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?
- gt565k 10y agohttps://en.wikipedia.org/wiki/HTTP_referer https://en.wikipedia.org/wiki/HTTP_referer
- ge96 10y agoThanks
- timdavila 10y agoIn PHP, you're looking for $_SERVER['HTTP_REFERER']
- ge96 10y agoNice! 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
- joshyi 10y agoUse something like https://goaccess.io https://goaccess.io