The test.php refreshes a new random number every 10 seconds from count.php. It works well when 2 files is located in local server, but it cannot refreshes a new random number if test.php is located in local server and count.php file is located in web hosting server (not local server).
I've searched the solution and try to test it again and again; including edit php.ini "allow_url_include = On", but it also cannot refresh a new number. Please help me, thank you!
test.php
- Code: Select all
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
<script>
var auto_refresh = setInterval(function() {
$('#load_num').fadeOut('fast').load('http://www.abc.com/count.php').fadeIn("fast");
}, 10000);
</script>
</head>
<body>
<div id="load_num">7</div>
</body>
</html>
count.php
- Code: Select all
<?PHP
echo rand(5, 15);
?>