
This blog post has absolutely nothing to do with CMS's and the Internet, but I am going to have a bit of fun using the skills I have – it is a public holiday here in the UK after all
<?php
$to_find=array(
'Clinton',
'Obama',
'Hitler',
'Stalin',
'Washington',
'Gandhi',
'Thatcher',
'Osama',
'Churchhill',
'Blair',
);
header('Content-type: text/plain');
error_reporting(E_ALL);
set_time_limit(0);
$dh=opendir('.');
while (($f=readdir($dh))!==false)
{
if (substr($f,-4)=='.sgm')
{
echo "Trying $f\n";
$contents=file_get_contents($f);
$words=preg_split('#[^\w\']#',$contents);
foreach ($to_find as $x)
{
for ($j=0;$j<count($words)-strlen($x);$j++)
{
$good=true;
for ($i=0;$i<strlen($x);$i++)
{
if (@strtolower($words[$j+$i][0])!=strtolower($x[$i]))
{
$good=false;
break;
}
}
if ($good)
{
echo "Found $x around:";
for ($i=0;$i<strlen($x);$i++)
{
echo ' '.$words[$j+$i];
}
echo "\n";
}
}
}
echo "\n";
}
}
closedir($dh);
Found Osama around: owned subsidiary a merger agreement [Conspiracy: Osama Bin Laden has infiltrated the Western world via Gulf-backed mergers, and/or funded by subsidiaries of oil companies]
Found Osama around: of such a market as
Found Osama around: officials said a major aim [oh my, that is ripe for conspiracy theory writing, but I'm treading carefully here…]
Found Stalin around: shut temporarily are located in North [Conspiracy: Stating that Stalin's Northern empire, the USSR, would shut temporarily in 4 years time, but re-open soon after]
Found Blair around: BC LME ALUMINIUM IST RIN
Found Obama around: Omaha basis and midwest area [I'm not an expert on US politics, but I'm sure someone could make something of that]
Found Osama around: on South and Mid Atlantic [ditto]
Found Obama around: our bilateral and multilateral assistance [this sounds very Obama, right]
Found Osama around: out such a meeting altogether [No peace talks then?]
There have been no trackbacks yet