I have a page on which I want to include another php page and update this page every 1 second. I try to include it using javascript and .load but it doesn't work. A solution doesn't have to involve using javascript and php, I'm just looking for a way to show who's online on my forum.
test1.php
<html>
<head>
<script>
setInterval(function () {
$("#show-time").load("test2.php");
}, 1000);
</script>
</head>
<body>
<p id="show-time"></p>
</body>
</html>
test2.php
<?php
echo time();