ViROSS,
* (+/-)
<?php
$time = 1; // Время обновления в секундах
// Массив с URL-ами картинок
$img = [
'http://johncms.com/files/users/avatar/5435.png',
'http://johncms.com/files/users/avatar/35211.png',
'http://johncms.com/files/users/avatar/6698.png'
];
shuffle($img);
$file = 'http://'. $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];
echo '<span id="img"><img src="'. $img[0] .'" alt="'. $img[0] .'" /></span>';
?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script>
$(function(){
var file = '<?= $file ?>';
var time = 1000 * '<?= $time ?>';
setTimeout(function tick() {
$('#img').load(file + ' #img');
setTimeout(tick, time);
}, time);
});
</script>