title: AJAX: display a random line every minute
body: <p>I have <a href="http://preferans.de/hint.php" rel="nofollow">a PHP-script</a> displaying random text:</p>
  
  <pre><code>&lt;?php
  
  $quotes = array(
          'quote 1',
          'quote 2',
          'quote 3',
          'quote 4',
          'quote 5',
  );
  
  $i = array_rand($quotes);
  
  header('Content-Type: text/plain; charset=utf-8');
  print($quotes[$i]);
  
  ?&gt;
  </code></pre>
  
  <p>How could I call it every minute to display a new quote (Russian text in UTF8 encoding) at my web page (which itself is <a href="http://apps.facebook.com/video-preferans/" rel="nofollow">an iframe app</a> at Facebook)?</p>
  
  <p>Do I need to use jQuery here or is there a lighter solution, working in the usual browsers?</p>
  
  <p>I don't have any AJAX experience yet.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>As suggested by Uku Loskit below, I've added the following snippet and it works well. Can anybody please show me how to fade the new quote in with fadeIn()?</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(function() {
          setTimeout( function() {
                  $.get("/hint.php", function(data) {
                          $("#hint").html(data);
                  });
          }, 5*60*1000 );
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Thank you!
  Alex</p>