I have qr code that generate code to my website www.myweb.com. But I want to customize : If visitor website generate code from QR code use smartphone it will redirect to www.myweb.com/qr.php. This the algorithm scheme:
If visitor website -> QR code
redirect to www.myweb.com/qr.php
Else
redirect to www.myweb.com
Any trick for that on PHP language, without change my QR code because I have already print on all collateral, like sticker, card name, etc ? I have search but not find yet.
If the link from the QR code is simply www.myweb.com
, I'm afraid you are out of luck. There is absolutely no difference between reading a QR code and accessing the link and manually typing in the address.
The only possibility is you may be able to catch certain visitors if they are using an app to read the QR code, subsequently view the target page in-app, and said app has something identifiable about it's User Agent string. I have not experimented with this, but I would suspect this is actually not the case.