This is pseudocode (intended to be real code, but called pseudo cause I always mistype something)

PHP Code


<?php
ob_start();
include_once( "/path/to/island/news.php" );
$body .= ob_get_contents();
ob_end_clean();
if( !headers_sent() ) {
	header( "Content-type: text/javascript" );
}
	
$body = str_replace( "\r\n", '\n', $body );
$body = str_replace( "\r", '\n', $body );
$body = str_replace( "\n", '\n', $body );
$body = str_replace( "'", "\\'", $body );
echo 'document.write( \'' . $body . '\' );';
?>


This script will take an include-file style content island and turn it into a javascript island