вот лично для вас рабочий вариант раз уж так туго идет:
файл index.html
<html>
	<head>
		<title>123</title>
	</head>
<body>
  <div id="response"></div>
  
	<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
	<script type="text/javascript">
	res = $('#response');
	function send()
		{
		$.post("get.php", function(data)
			{
			res.html(data);
			});
		}
	setInterval(send, 2000);
	</script>
</body>
</html>
файл get.php
<?=rand(1, 1000);?>