<?php
$imgs = Array
(
  0 => "http://localhost/imgs/image1.jpg",
  1 => "http://localhost/imgs/image2.jpg",
  2 => "http://localhost/imgs/image3.jpg",
  3 => "http://localhost/imgs/image4.jpg",
);

if(isSet($_GET['hour'])){
  $hour = $_GET['hour'];
  if($hour >= 0 && $hour <= 5){
    echo $imgs[0];
  }
  else if($hour >= 6 && $hour <= 11){
    echo $imgs[1];
  }
  else if($hour >= 12 && $hour <= 17){
    echo $imgs[2];
  }
  else if($hour >= 18 && $hour <= 23){
    echo $imgs[3];
  }
  else{
    echo "error";
  }
}
else{
  echo "error";
}
?>
