Archive for August 2009

Lucky in my Shinjuku office hoarding slippers

This morning before an early meeting I found most of the slippers missing AGAIN. This is Japan and as you may know its customary for people to take off their shoes at the door. The culprit as usual "Lucky" my ferret, he seems to have a "thing" for collecting slippers. Here you can see him hoarding a bunch behind the Sun rack:


He has another "cubby" of slippers up the other end of my office, when he makes his way with the slippers he cannot be stopped. Best to let him do his 'ferrety'** thing I suppose:


Loving the crunchy sounds a plastic bag can make ferrets go nuts when you give them one. Lucky is 100% deaf, but he still must get enjoyment from the feeling of it. Another thing they love is tunnels, tubes and holes. So if heaven for a ferret is a plastic bag, doubly so if it's in the shape of a two meter tube. Such treasure he found in my office:



After about half an hour he gets a little tired, here he is plotting his next moves:

More photos of that morning here.
After these acts of vandalism, he always returns to his natural narcoleptic state.

** Ferrety (new word by me)

Some simple redirection using PHP

Some simple redirection I wrote ages ago! using PHP, looks bad but works. I literally added to it as sites grew.

/* Nexus Redirector: Web Portal */
/* */
/* Copyright(c)2002 Bernard Edlington bernard(at) */
/* */
/* */
function checknex() {
global $HTTP_HOST;
$HTTP_HOST= getenv('HTTP_HOST');
$str = $HTTP_HOST;
$str = strtolower($str);
$site = "";
$site1 = "";
$site2 = "";
$site3 = "";
$site4 = "";
$site5 = "";
global $HTTP_HOST;
global $PHP_SELF;
if ((ereg ("(.*)".$site2, $str))||(ereg ("(.*)".$site3, $str))||(ereg ("(.*)".$site4, $str)))
header( 'Location:' );
elseif (ereg ("(.*)".$site1, $str))
header( 'Location: http://noneofyabusiness/' ) ;
elseif (ereg ("(.*)".$site5, $str))
header( 'Location: http://www.noneofyabusiness1/' ) ;
elseif (ereg ("(.*)".$site, $str))
header( 'Location:' ) ;
$pattern = array('/\.com$/', '/\.co\.jp$/','/\.jp$/');
$replacement = '';
$wiped = preg_replace($pattern, $replacement, $str);
$pattern1 = '/^.*\./';
$wiped1 = preg_replace($pattern1, $replacement, $wiped);
echo'<meta http-equiv="refresh" content="5;url=http://www.">';
echo'<center><h3>',$wiped1,' message here</h3></center><br>
<center><img border="0" src="/images/logo1.png" width="90" height="80" alt="icon"></a>
<img border="0" src="/images/logo2.png" width="358" height="26" alt="icon"></a></center>';
echo'<br><center><h3>you will be redirected in 5 seconds</h3></center>';
echo'<center><h3>click <a href="http://www.">here</a> if you have any problems</h3></center><br>';