<?php

include 'includes/linkshead.php';
?>
<script type="text/javascript">
//    Brother DCP-116C
    $(document).ready(function () {
//        var test = btoa($("#list").text());
        var test = btoa($("#list").text());
        
        $.ajax({
            url: 'http://127.0.0.1:9100/htbin/kp.py',
            data: {p: 'Brother DCP-116C', d: test},
            success: function (bytes) {
                document.getElementById("list").innerHTML = bytes;
            }
        });
    });
</script>
<?php
echo "<h1 id='list'>Wait to Print</h1>"
?>