title: Provide via Ajax an unique id to php script
body: <p>A client needs to beat to a server every time page loads.</p>
  
  <p>The same file will be loaded in diferent computers via Resilio Sync (similar to Google Drive) - not from a server!
  I wanted to read a local txt file outside the synced folder so as to get a different parameter(playerid) and beat accordingly.
  I read and discovered that that is not possible due to security (open local file).
  Can you think of something else?</p>
  
  <pre><code>client.send();
  var xmlhttp = new XMLHttpRequest();
  xmlhttp.open("GET", "http://192.168.1.105/ds2/controllers/latir.php?playerid=" + playerid, true);
  xmlhttp.send();
  }
  </code></pre>
  
  <p><strong>Solution</strong>
  This is a Digital Signage Project.
  I will be running a bash script on @reboot wich will read a PlayedId and VersionID stored in a file and make a curl inside a while(true) every 20 seconds (sleep(20)) and that will provide the sense of Online/Offline: if last poll was more than 20 seconds ago, the player is offline. The curl will also compare the VersionID against the last version of the set of files and will rsync if needed.
  The html will be local due to an Offline First approach. 
  Then i have two posibilities:
  -The ajax from local file (will be possible due to Chromium, wich has a parameter called --disable-web-security, will check if Chromium needs to update.
  -The bash script can also update the Chromium instance if needed.</p>