Posted on: 24/01/2006 19:28:09 - 9 comments
Tagged in: arcticmonkeys, php, mysql, geek.
Well after my previous entry about the Arctic Monkeys they went straight in at number one in the UK Charts heh. Now perhaps the record industry will accept that free music online doesn't affect the sales of records. The Arctic Monkeys literally gave all there tracks away on the net for FREE well before they even got a record deal and both tracks they have released so far have gone straight in at number one. Also they had already SOLD OUT on there tour before they released anything in the charts and why? Well because people had ALREADY heard them on the web. I'm not sure if the people at record empires realise it yet but, hello? The web and music sharing is about the cheapest way to market a band EVER. The Arctic Monkeys again just proved that beyond a doubt.
Bad Hair
As you can see by the below picture, I require a hair cut. I'm just not used to that sort of thing having had either dreads or a shaved head for all of my adult life; bah!

Geek Stuff
I've been sorting through a lot of my source code recently and I think I might start to give some of it away. Just simple things that I have found never-ending value from because, well, they just make life that much easier when you're trying to develop a web based application, site or function. A lot of folks don't use classes when they write PHP because it is quite high level stuff and not for the faint of heart when it comes to keeping a grip on a 150,000 line project with 30 classes, 10 extended ones and a nice chunk of Mysql using objects thrown in to really liven things up. The problem is that you tend to write functions which is a great way to code but most of the time very few of those functions will ever make it out of the project you are writing them for because they just don't suit anything else; including database connection handling and query building. If you get in to the habbit, or already are in the habbit of writing functions that deal with this sort of thing a top tip from me is to create a class out of it. Given the fact that there is really only one proper way to connection from to a database it makes sense that if you do multiple projects at any one time that you'll reuse the code so why not make it in to a nifty class and just drop it in where you need it. People have been enjoying OOP (object orientated programming) for quite some time and I often see lots of the scripts on the net with the same function calls repeated a billion times when you could just be using something like....
$this->connection
instead of...
mysql_connect($host, $user, $pass);
Makes for much easier to manage code and also splits things up nicely so that you don't feel lost. The amount of lazy programmers that I come across that open essentially dozens of connections and don't test to see if one is already open is astounding, no really. So anyway, over the coming week when I am taking a 10 minute break from doing freelance work I am going to get some of this stuff together and write a small tutorial on the basics of classes. Hopefully it will be of some use to someone? In the meantime go and read about it at www.php.net/class.
People:
Mal! - Kev! - Bumble! - Neil!
Posted on: 16/01/2006 11:42:35 - 4 comments
Tagged in: music, arcticmonkeys, indie.
The single will be released today (I think) and the video is available already on the Domino Records site. The track listing on the CD is different to the 7" which is annoying but hey anyone that has followed them will already have them. They were available on the web right up until very recently when the project at save file was removed. I guess thats to be expected but hey people will still go out and buy it because they are that good!

Go and visit the mini-site and have a listen to the sample of When the sun goes down and watch the video!
For more info don't forget to visit the official Arctic Monkeys site.
When the Sun Goes Down
So who's that girl there?
I wonder what went wrong
So that she had to roam the streets
She don't do major credit cards
I doubt she does receipts
It's all not quite legitimate
And what a scummy man
Just give him half a chance
I bet he'll rob you if he can
Can see it in his eyes, yeah
That he's got a driving ban
Amongst some other offences
And I've seen him with girls of the night
He told Roxanne to put on her red light
They're all infected but he'll be alright
Cause he's a scumbag, don't you know
I said he's a scumbag, don't you know!
Although you're trying not to listen
I bet your eyes are staring at the ground
She makes a subtle proposition
I'm sorry love I'll have to turn you down
And oh he must be up to something
Want half a chance to show he's more than likely
I've got a feeling in my stomach
I start to wonder what his story might be
What his story might be
They said it changes when the sun goes down
And they said it changes when the sun goes down
And they said it changes when the sun goes down
Around here
Around
And look here comes a Ford Mondeo
Isn't he Mister Inconspicuous
And he don't have to say 'owt
She understands she's here to get picked up
And she's delighted when she sees him
Pulling in and giving her the eye
Because she must be fucking freezing
Scantily clad beneath the clear night sky
She don't stop in the winter no and...
They said it changes when the sun goes down
And they said it changes when the sun goes down
And they said it changes when the sun goes down
Around here
They said it changes when the sun goes down
And they said it changes when the sun goes down
Over the river going out of town
And they said it changes when the sun goes down
Around here
And what a scummy man
Just give him half a chance
I bet he'll rob you if he can
Can see it in his eyes that he's got a nasty plan
I hope you're not involved at all
Posted on: 16/01/2006 11:20:34 - 3 comments
Tagged in: blog, security, geek, images.
Always fun to catch them out. Problem is trying to stop them can cripple not only your own server but also anyone who you want to share your content with who you're more than happy to let hotlink it. In a perfect world you'd have everyone take a copy of your image or whatever but it just isn't practical, especially when that media might change. I recently suffered this problem, and still do. I still do because I'm still deciding on what to do. I can see by my log that someone has hotlinked the "pod" image from the music list of the right side. The request comes from a forum which is locked off and requires you to actually fax to the owners a copy of this to be authorised to log in (which is pretty heavy really). As you may or may not know it's written in Turkish, shame I have a friend who lived there for years, no problems in knowing what it says. Aside that we have some clever bod on myspace who has a "friend" who decided to hotlink the "the rising dragon" music image. You'd think people would get a life, get some eyesight and realise that the copyright logo at the bottom means in lamer terms: "Don't steal my stuff thanks", alas no.
So whats a geek to do?
Well I emailed the Myspace user and politely requested that they remove the comment that hotlinks my image. No response as yet but hey I'm a patient man. The forum which is hotlinking that is Turkish will fall foul of the power and Voodoo of Mod_Re-Write and below is the simple rule by which I will block them.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://[^./]*\.tek.org.uk [NC]
RewriteRule \.(png|gif|jpe?g)$ - [NC,F]
That added to my .htaccess file will basically block everyone that is not coming from my domain. No request outside of tek.org.uk can access images. This is all well and good but I have particular sites that I myself have hotlinked images too. Ratatak being one of them. So I can simply adjust the rule set slightly to allow ratatak to hotlink to my media content.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://[^./]*\.tek.org.uk [NC]
RewriteCond %{HTTP_REFERER} !^http://[^./]*\.ratatak.com [NC]
RewriteRule \.(png|gif|jpe?g)$ - [NC,F]
I can, of course, continue to add whomever I like to the ruleset.
The revolution is not coming hotlinkers. The resistance continues.
Posted on: 15/01/2006 14:59:31 - No comments
Tagged in: google, technorati, dogpile, voodoo, apache, keywords.
Ok so after doing a little research in the last week I have noticed that across most of the search engines (barr dogpile because that is now the only one that still rawks) that my search engine rankings have dropped off the map. Except for very specific keywords which could only relate to me personally the bots seem to be having a tough time indexing the site. Didn't take long to realise why and dumbass me should have really spotted this months ago, if not over a year. I mean I do this simple thing for clients to ensure high rankings so, doh! Why not me? The problem was that the URI of any resource is now seemingly more important for releavance than the content itself. Basically, and this is where I dislike Google, it seems that Google is more interested in a site address that sounds more like the resource the person is searching for than the actual content of said resource. Therefore by adding the title in the URI problem solved. Again all this is done on-the-fly and the URI doesn't really exist in reality. I love the Voodoo!
Also I have sucumbed to the Technorati tagging of posts and no doubt I'll end up becoming del.icio.us at some point also.
Posted on: 09/01/2006 16:48:16 - No comments
Tagged in: Lohan, DDoS, ytmnd.com, Ebaumsworld.
An animated gif of Lindsay Lohan, stolen from ytmnd.com and placed on Ebaums world without a credit has caused uproar -the massed ranks of ytmnd.com, somethingawful.com and newsgrounds descended upon ebaums site and hosed the lot. Its all got a bit serious now and site owners are appealing for calm (and getting nowhere). Script kiddies at the ready... "All your base belong to us"
Found on Digg, linking to Vital Security.
As rumour has it an approx of potentially 10,000+ hackers may decide to target Ebaums world. That's a shitter, whats made me laugh is I've just had a text about this on my mobile of all things heh... Seems like this time it's serious!
More Pages