I've just changed the CSS for the blog - just before University starts! Ben said he had a new design he had to get round to creating and I said I'd probably make a new design for my site before the new year started and I've made it! Now to see if he makes his "CSS: Reboot" deadline.
There may be some areas that aren't working quite right at the moment (I know some of the areas need a bit more padding and the body background doesn't quite seem to be sitting perfectly) but what you see is pretty much what it is going to look like. Thanks to Studio 28 and their Fatal IE Windows XP Visual Style for giving me the idea of the nice subtle fade effect.
Update: OK, so the background problem was actually a problem with the background image (damn Photoshop and its laters, I thought they were merged!) Everything else looks fine at the moment. If anyone spots anything that looks odd/old-style-blue, then comment here or contact me ![]()
Checking over stats, its always strange to see some of the things that some people search for. Some of them are obvious oddities such as the site domain, which is generally someone running a default Firefox homepage where the Google Search box steals focus when they meant to type it into the address field. Others are a little stranger:
I'm sure I have more burried away in my logs - just got to find them.
After trying to get some server load/uptime scripts running for my sites, I had to submit a support ticket to the techs to find a way of getting the average loads without fread()ing the /proc/uptime 'file'. Apparently we don't get read access to /proc/ because of security/hacking issues. The solution? use PHP's backticks (` - not to be confused with apostrophe's) and run the uptime command through PHP's shell execution!
Now it seems slightly counter-intuitive to me that /proc/ can't have read access, but we can execute shell commands, but such is life. Here is my simple server load and apache uptime script (note: you'll probably need to highlight the text and scroll it sideways):
<?php
$uptime = @exec('uptime');
//echo $uptime;
preg_match("/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/",$uptime,$avgs);
$uptime = explode(' up ', $uptime);
$uptime = explode(',', $uptime[1]);
if (strpos($uptime[0],"day")===false){
if (strpos($uptime[0],"min")===false){
$days = 0;
list($hours, $minutes) = explode(':',trim($uptime[0]));
}
else{
$days = $hours = 0;
$minutes = (int)$uptime[0];
}
}
else{
$days = (int)$uptime[0];
list($hours, $minutes) = explode(':',trim($uptime[1]));
}
Header('Content-type: text/plain');
echo <<<EOF
Average Load (1 min): {$avgs[1]}
Average Load (5 min): {$avgs[2]}
Average Load (15min): {$avgs[3]}
Uptime: $days days $hours hours and $minutes minutes
EOF;
?>
And if you're interested in the current IBBoard server stats, it's running at http://www.ibboard.co.uk/uptime.php
I've noticed recently (especially on my girlfriend's Perfect Imagination site where the counter is at the top) that PPHLogger (the hitcounter I use that is installed on my server) was giving very bad performance. It wasn't due to the large tables, but because of the slowness of the PHP getHostByAddr() function that converts, for example, 172.0.0.1 into localhost (a reverse DNS lookup).
So what was the speed improvement? Stop it looking up the host every time and just store the IP (instead of host and IP). I've now got a separate process that I'll be putting into a Cron job to run regularly to keep my stats updated with the hosts. The only possible downside is that my country stats might not work, but then I never paid much attention to those anyway!
It isn't work for my site, but it is work on my CMS system. I've now added an extra two fields to the Beta Search module for my girlfriend's Perfect Imagination Beta Reader Search module. The two fields were a request that she thought might keep me busy for a while, but they were done this morning before the Formula One began ![]()
I've also got more functionality added into the Downloads module (or made more accessible and complete anyway), but I've yet to upload it - possibly when I've got a few more additions done.
Now that I'm back as a student and working on my own projects again (Grots/Magic, the CMS; Dawn of War pattern files and general HTML tweakage, plus getting back into Games Workshop) it feels like time to start a blog instead of posting notes on my website news.