• Hi - I think probably your best solution is to put literally just NRF.nfcURL('https://www.yourwebpage.com'); on the Puck.js

    Then, the Student's device will load that webpage from the server - and that would trigger your PHP to run which could record the current time.

    To stop the chances of a URL getting shared or reloaded, you could maybe do:

    var counter = 0;
    NRF.nfcURL('https://www.yourwebpage.com?id='+counter);
    
    NRF.on('NFCoff', function() {
      counter++;
      NRF.nfcURL('https://www.yourwebpage.com?id='+counter);
    });   
    

    Note we do it on NFCoff - which will happen when the phone is away, so there is no 'race' between preparing the NFC packet and having it read.

    That way your PHP could discount any IDs that were the same, and it also reduces the chances of the page getting cached and your PHP not getting run

About

Avatar for Gordon @Gordon started