Hyperspin for PHP page monitoring

Permalink 11:14:48 am, Categories: General, 286 words  

I've had a few occasions where my site has been unavailable because the server load was so high that Apache stopped serving PHP pages or the database was completely snarled up and non-responsive. Having set up a free SiteUptime.com monitor for my domains, it gave me some idea of when the site was down. Unfortunately it is only half-hourly and doesn't seem to check that content is being server, only that the server responds on port 80 (which it will eventually do sometimes, even if PHP isn't being served).

Recently, I found out about Hyperspin, who also do website monitoring as well as web server monitoring. This means that it'll monitor my PHP pages instead of just port 80 - hurrah! A simple free signup and I know have Hyperwave Monitoring for hiveworldterra.co.uk set up to check every five minutes. I could have set it up to check every minute, but I thought that was a little excessive :D

So far it all seems good, and the report is useful and customisable (so I can show outages, downtime for the previous month, time of next check etc). The only potential bad point is that they might end up killing my free account at some point - but they don't specify when. I've looked around and all I can find is bits saying "upgrade to pro" and an FAQ saying that sites might be restricted if you keep signing up for new free accounts as the last one runs out.

So, the public report is available for those who want it. Since it's all on the same server, the report applies to Hive World Terra, Skins @ Hive World Terra, Hive World Terra Forums, this blog and Perfect Imagination.


Junk removed from logs

Permalink 05:33:11 pm, Categories: General, 280 words  

It won't stop those pain in the arse spammers trying referal spam on my site (I don't even publically show referals, so it's useless for them anyway) but I've just cleared out my referal logs. Removing v[insert word here].com, any domains containing "real-estate" (or without the hyphen), mortgage, medications and realty seems to have done the trick. I've also added some custom filtering into the PHP code so that they get blocked. It might be a little agressive - if anyone should get refered from doctordolittle.com or ... some other domain that contains one of the specific words that I can't think of at the moment, then they should get a "bad character in referer" error. I didn't do it for the the v[insert word here].com domains, because other than the v at the start there was nothing specific enough - vjurour, viner and v a few other things, but anything I could think of would have been too inclusive of innocents.

My referals list is now down to 13! (because b2evo ignores search engines in the normal list) Now to see how long it'll stay that way!

Update: OK, one referer snook in overnight (realantiques who were, unsuprisingly, gambling spam). Some more filters have been put in place for the more obvious and less-likely-to-block-good-things pages they tried referer spamming with.

Update 2 (7th December): Some more referers have managed to get through, but I am now blocking a much larger list while trying to keep it to a method that will block as few valid referers as possible. Each referer that gets through is a referer that gives me more of an idea on how to block them :)

Additions to Beta Search module in Magic

Permalink 04:57:17 pm, Categories: Programming, 124 words  

Following a survey of the beta readers at Perfect Imagination Harry Potter Beta Reader Directory, some new features have been planned for the Beta Reader Control Panel.

The most important, and just coded but not released, feature is more detailed logging of assignment progress. This means that beta readers can track their assigned stories chapter by chapter and report what step each chapter is at.

Also planned is the inclusion of an automated "have you abandonned this story?" email and the ability for beta readers to add their own assignments - useful for people who want to track all of their assignments in one place, even if the author didn't contact them through Perfect Imagination.

Hopefully these features will prove useful when they are released.


Odd searches hitting my site (take 2)

Permalink 10:21:39 pm, Categories: General, 256 words  

OK, I promised in the original post that there would be more when I found them, so here are some of the more interesting or odd searches that hit my sites (some won't have links for now because I'm looking at a list of search terms, not the actual searches):

  • Top Rated CMS (and yes, my site ranks top! without even trying!)
  • "homemade camoflage" - did they want tips on DIY fatigues?
  • "w40kdata-sharedtextures-full.sga download", "warhammer sharedtextures download", "w40kdata-sharedtextures-full.sga. download", "w40kdata sharedtextures full.sga", "w40kdata-sharedtextures-full" and "w40kdata-sharedtextures-full.sga" (plus several others with different spacings and odd characters) - the first three (six people in total) definately wants to download it, and the twelve who searched the last one might. Why? It's over 250MB and comes with the Dawn of War game!
  • "dowfiles.com" and "dowfile" - always good to rate high on the competitor's name! I currently rank second for dowfile and top ten for dowfiles.com.
  • "camino netscape navigator skin" - not got anything about that on my site. I do have a page saying that the CSS of the skin is compatible with various browsers though.
  • "rdn wiki website" - strangely, I rank top for that, even though Relic have the actual Wiki (which isn't even in the top 50!)
  • "homemade drop pods" - model sized, not the real thing I hope!

I think that'll do for now. There are more strange searches in my lists, but you're looking at more than 2,500 different search terms that I'd have to sift through, just for Skins@HWT!


Optimisation of Grots

Permalink 08:36:16 pm, Categories: Programming, 357 words  

As well as very recent work on the Beta Search module for Magic, I've been working on performance improvements for Grots, the CMS over at Skins@HWT. Although the speed improvements won't be restricted to Skins@HWT, they are currently being tested or about to be tested there.

Current performance enhancements of Grots include caching language and skinning into PHP files instead of reading them from the database every time (originally implemented because of the annoying habit of webservers not to have the correct permissions to edit flat files without setting them to 777 - writable by everyone). Also being added is caching of CSS (which can already be done by proxy servers anyway, because of the headers that I pass) and caching of the template into a PHP file.

Add to this a few code changes (such as taking advantage of SQL functions and streamlining code where I can now see I took the long route to the solution) I should hopefully be able to optimise the code even further. Add to this the fact that no-one has been very helpful in my Optimisation of Loops thread on the DevShed forums and that I've not been able to recreate the php.lt benchmark stats and it looks like that'll be the end of most of my optimisations. There would be something to gain from flattening some functions, but just about all of them are for improved reusability and maintenance and so are staying.

In other news, it looks like there could be a new spider that has bypassed the old isSpider() function that I created and use. It hit a lot of my download pages (just about all of them) within a couple of minutes and failed on all of them (because it didn't have a session). It's name is "DTAAgent" and all I can find on it is a post or two on some forums (WebMasterWorld.com I think it was) which say that it might be an IBM development or it resolves to an IP Address owned by British Telephone Directory company 192.com. I'll keep an eye on it and see if any more information emerges.

Counter in Magic

Permalink 08:01:12 pm, Categories: Programming, 121 words  

An additional feature has now been added to the Beta Reader Directory module over at Perfect Imagination (which runs on Magic). It isn't visible to the majority of users, but registered Beta Readers now get to see a hit counter of visitors to their profile. This will help give a better idea of whether they are not receiving many assignments because people are not viewing their profile after finding it in a search (meaning that their profile is too focused) or whether people are viewing but not requesting them (meaning that their profile isn't advertising their skills to the full).

Hopefully this will be a useful improvement for the Harry Potter Beta Readers over at the Perfect Imagination Beta Reader Directory.


Modules added, updated and corrected

Permalink 10:22:02 pm, Categories: Programming, 173 words  

Over today and yesterday I've added a new module to Skins@HWT (an FAQ module), updated the Encyclopedia module to include a "source" for the information and even had time to fix the paging and other issues that the Encyclopedia was having.

I've also just updated my development server (Linux Fedora Core 3) to run MySQL 4.0 instead of the 3.2 it came with. It could have been easier -- the Yum repositories only go up to v4.0 if you're running Fedora Core 4, and trying to update from them confuses Yum with the amount of associated updates it has to try to do -- but having found a few references on the Internet, I went to the MySQL Download Site and grabbed the x86 RPM Downloads (including "Dynamic client libraries") and all is now good :) I just need to set up the database again and I can use things like FOUND_ROWS() and SQL_CALC_FOUND_ROWS to get better performance, and I'll be able to test them on my development machine instead of just the live server.