1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Is there a way to only allow traffic from QR codes in?

Discussion in 'Web Design & Development' started by namenotfound, Feb 18, 2013.

Thread Status:
Not open for further replies.
  1. namenotfound

    namenotfound Thread Starter

    Apr 30, 2005
    So let's say I want to set up a special page that's only accessible from a QR code. So if you were to put example.com/specialpage into your web browser, it would come up blank or have a message saying you need special access. But if you were to scan a QR code that links to that webpage, it would show?

    I'm not talking about detecting a device (because QR codes aren't limited to phones, a desktop computer with a cam and the right software can scan them too), I just want to be able to detect if you're being linked to the site via a QR code. It can't be a special referral link, such as example.com/specialpage?qr because someone could still access the page by entering that in their web browser.

    Is there any way to do what I want, without any loopholes?
  2. andythepandy


    Jul 2, 2006
    I don't think that would be possible, considering that all QR scanners do is decode the URL and then use a browser to go to that address, so I don't think there would be a way to restrict it to only QR codes.

    You could make the URL some long code or something so it's inconvenient to type manually :/
  3. NegativeKelvin


    Apr 11, 2012
    You could use somethings like
    PHP GET, 'if' statements, and 'else' statements, and make it so when you visit


    it shows the page, but make it echo something else if it is just /pagename.php or /pagename.php&code=incorrect code
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1090056

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice