User Tools

Site Tools


cloud

How to send data to your website?

  1. Choose “XML File” output in Scoreboard OCR
  2. Enable FTP upload option for your website (depends on your service provider)
  3. Install FTPBox on Scoreboard OCR computer
    1. Add your website FTP details
    2. Add the XML file to the
    3. Choose Sync Frequency 'automatically'
    4. Choose AutoStart

You can use this javascript to read XML file located on a website:

function loadXml() {
    var xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function() {
        if (this.readyState == 4 && this.status == 200) {
            var parser = new DOMParser();
	    var xmlDoc = parser.parseFromString(this.responseText,"text/xml");
            
            console.log(xmlDoc.getElementsByTagName("time")[0].childNodes[0].nodeValue);
       }
    };
    xhttp.open("GET", "http://yourhost/ocr.xml", true);
    xhttp.send();

You can also use PHP to parse a local XML file:

$myXMLData  = file_get_contents("ocr.xml", true);
$xml=simplexml_load_string($myXMLData);

echo $xml->time;

Here is sample XML file created by Scoreboard OCR:

<?xml version="1.0"?>
<root>
    <time>9:31</time>
</root>
cloud.txt · Last modified: 2021/02/09 22:52 by arturs