<!DOCTYPE html>
<html>
    <body>

        <h1>Getting server updates</h1>
        <div id="result"></div>
        <script>
            if (typeof (EventSource) !== "undefined") {
                var source = new EventSource("get_event.php");
                source.onmessage = function (event) {
                    document.getElementById("result").innerHTML += event.data + "<br>";
                    source.close();
                };
            } else {
                document.getElementById("result").innerHTML = "Sorry, your browser does not support server-sent events...";
            }
        </script>