You do not need ajax for this. here is a method using php.
$do = 'yes';
$ann = '';
$file = @fopen("announcement.txt","r") or exit("announcement file does not exist!");
$ann .= fgets($file);
if($ann != '') $ann = $ann.'<br />';
if($ann == '')
$do = 'no';
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
border: black solid 1px;
$mystring = <<<EOT
if($do == 'yes') echo $mystring;
Give me an announcement
The text file "announcement.txt" is your announcement and looks like this:
Now is the time
for all good men
to come to the aid
of their country
Test this with the given text file. Then empty the text file of everything and lastly test it by deleting the file altogether.
If you like this approach and want further explanation of the code just LMK.