<html>
<head>
<style type="text/css">
body {
background-color: #000000;
font-family: Arial, Helvetica, sans-serif;
font-size: 20px;
text-align: center;
color: #FFFFFF;
}
</style>
<script type="text/javascript" src="jquery-1.4.js"></script>
<script type="text/javascript">
function sleep(ms)
{
var dt = new Date();
dt.setTime(dt.getTime() + ms);
while (new Date().getTime() < dt.getTime());
}
function update() {
while (0 < 1) {<?php $contents = file_get_contents("my url here");
?>
var count = <?php echo $contents ?>;
document.getElementById('div').innerHTML = count;
sleep(1500);
}
}
</script>
</head>
<body onload=update()>
<iframe id="iframe" src="my url" style="visibility: hidden;"/>
<table width=100% height=100%>
<tr height=80%>
<td width=100%>
<center>
<div id="div"></div>
</center>
</td>
</tr>
</table>
</body>
</html>
When viewing the source code in-browser, the var
is set correctly, but it won't set the content of the div
. I am positive that the url the PHP script is pointing to is accurate and contains only a script to grep a number from an external page.
Thanks in advance!