-1

I have to build a (PHP based) landingspage that is used on WIFI access points (HP Aruba). The requirement would be: "If already filled the form for access, just show www.google.com (without loging in or something), if not, show them the form".

I would have done that by registering their MAC adresses, but I found out that was impossible trough PHP.

Do you guys have any idea of how I could achieve this?

Thank you already !

Solid
  • 105
  • 2
  • 15
  • What do u mean by client id – Web Artisan May 23 '16 at 09:08
  • @BikashP he probably means some kind of ID for auto-login for those, who have already signed in once. – Peon May 23 '16 at 09:09
  • What I mean by Client ID: "SOME UNIQUE REFERENCE" that I can use to authentify devices that go on the website. I wanted to use their MAC-Address but that's not possible trough PHP. – Solid May 23 '16 at 09:13

1 Answers1

2

Easiest way is probably setting a cookie that 'this' user has been authenticated and redirect them to another page.

Another possibility can be https://github.com/Valve/fingerprintjs2 that allow you to create a 'fingerprint' of a user. This you could save in your backend and compare it next time the users comes to your page.

EDIT, I linked to fingerprintjs, but there is a new version, fingerprintjs2

Milanzor
  • 1,920
  • 14
  • 22
  • So next time that same user that goes on that webpage will be recognised with fingerprintjs? Unless they wipe out their cookies? Am I understanding it right? – Solid May 23 '16 at 09:19
  • Read the 'What is fingerprint' part of the readme on https://github.com/Valve/fingerprintjs, it will explain what it does. In short, its a unique key for every browser that comes on your page. – Milanzor May 23 '16 at 09:33
  • I'll try it, and mark you as answer if it works as intended. Thank you for pointing this fingerprintjs2 out :-) – Solid May 23 '16 at 09:36
  • "It's worth noting that a mobile share of browsers is much more uniform, so fingerprinting should be used only as a supplementary identifying mechanism there." Unfortunately as devices that connects to a WiFi access point in my case are mostly mobile devices that solution isn't a good one. Thanks for pointing out that though ! – Solid May 23 '16 at 11:45
  • 1
    Yeah, then I suggest simply going for a randomly generated string saved in your backend as soon as your user logs in, then send it back to the user and saving it in a cookie. Next time he/she visits your page, the generated string can be compared to the saved strings in your database and you can check wether you show the login page or redirect to another page. – Milanzor May 23 '16 at 11:51
  • That could be it ! Though they would have to connect again if they wipe their cookies, but I think that's the closest I can get. Thank you for the idea dude ! – Solid May 23 '16 at 12:01