Get Script

with test2.php:


<?php

header('content-type:application/x-javascript;charset=utf-8');

if($content=$_GET['message']) {

   switch ($content) {
      case 1:
         $content='blue';
         break;
      case 2:
         $content='red';
         break;
      case 3:
         $content='yellow';
         break;
      default:
         $content='not a realisable message';
         break;
   }

   echo "content='".$content."';\r\nsetContent();";

}

?>