Need help with scrabble/anagrams?

My wife and I regularly play Scrabble like many thousands (millions) of people do…

And if like me you hate getting beat all the time… I have recently created a simple tool that will take your letters and suggest words to you!

The words are based on the TWL06 word-list at moment… but may add additional dictionaries as time goes on.

So go and give my ‘scrabbler’ a go!

BMMs Scrabbler

BMM's Scrabbler

Session Handling in PHP

Traditionally HTTP is a stateless protocol. That is it is made up of requests and responses and there is no notion of a ‘persistent connection’. This means that there is no way to have consistency or personalisation on the web since there is no way of knowing whom the request came from.

There are 2 primary methods – regardless of platform – that are used as a work-around for this.

First is a cookie. A cookie is a text file that lives on the client’s computer that store values set by your application. In general the file can only be access by the website/domain that issued it. The main problem with cookies is that they are un-trusted. A malicious user could modify the data and cause you problems!

The second – and better – solution is sessions. Similar to cookies, but they reside on the server, and cannot be directly modified by the client. When sessions are used, a cookie is still issued, but this simply holds the ‘session id’. This session id is generally sent by any request after it is created by the app including actions such as form submission. This ‘session id’ is a link to either a file or record on the server – depending how they are stored.

Continue reading

Need to make PHP ‘stop’… PHP wait timer

AJAX is great… but sometimes it’s too quick if you’re updating… So… How can I make the page wait for a few seconds, then proceed?

Well there are 2 functions PHP has to pause execution. They are:

sleep(NUMBER_OF_SECONDS);

and:

usleep(NUMBER_OF_MS);

One thing you may want to keep in mind is that if you are using a for loop and wish to do this, then you might want to increase the timeout:

set_time_limit(NUMBER_OF_SECONDS);

The Old Golfer

A circus owner runs an ad for a lion tamer and two people show up. One is a good looking, older retired golfer in his late sixties and the other is a gorgeous blond in her mid-twenties.

The circus owner tells them, “I’m not going to sugar coat it. This is one ferocious lion. He ate my last tamer so you two had better be good or you’re history. Here’s your equipment — chair, whip and a gun. Who wants to try out first?”

The girl says, “I’ll go first.”

She walks past the chair, the whip and the gun and steps right into the lion’s cage.

The lion starts to snarl and pant and begins to charge her.

About halfway there, she throws open her coat revealing her beautiful naked body.

The lion stops dead in his tracks, sheepishly crawls up to her and starts licking her feet and ankles.

He continues to lick and kiss her entire body for several minutes and then rests his head at her feet.

The circus owner’s jaw is on the floor. He says, “I’ve never seen a display like that in my life.”

He then turns to the retired golfer and asks, “Can you top that?”

The tough old golfer replies, “No problem, just get that lion out of the way.”

Panda in bar….

A panda walks into a bar and orders some food, after he’s done eating he shoots the bartender and starts leaving.

“Hey, you can’t do that!” said someone else in the bar

“Yes I can, I’m a panda bear it’s what I do, look it up.” says the panda bear.

Later he looks up “panda bear” and sure enough it says

“Panda Bear; Eats shoots and leaves.”

Search Engine Ranking via Title Tags

”How do I get my website page to rank well in search engines for a certain search term?”. While there are many techniques and tactics that can contribute to how your website ranks, one of the most fundamental is through the use of title tags. Title tags let search engines know what the main thrust of each web page is, and which categories or search terms to file the site under. By the way a title tag is what falls between the <TITLE> and </TITLE> tags in your html code for each page.

Continue reading

Forum is here…

I have recently added a forum to my site.

If you have any specific requests for some development (PHP,.NET … anything), project management, search engine optimisation… or just want to talk about something random.

I am active on experts-exchange.com and answer many issues, but I will also do that here!

Hope you can join me!

You can register for the form (and my site) here.

PHP – Generate/Create strong passwords, uuid, random string

Very often the need to create passwords or some other ‘unique’ string be it a captcha or for use as unique identifier (UUID).

Here are a few functions I’ve used and refined over the years, 2 types, for password/random string generation and UUID generation.

Generating random strings is pretty simple as it’ll be a password.

However for a UUID there is always the slim chance it’s not unique.
Continue reading

Signs of poor PHP ‘products’

If you are a professional developer (or aspiring) you will inevitably get asked to customise or even better “extend” existing wares.

If it’s a product you are familiar with great! If not I heartilly reccomend spending a little time investigating prior to accepting a job ( ultimatley if they are happy to give

access to their code, if not atleast tell you what’s been used so you cam repliocate it to play with briefly). I know this sounds like a lot of work wich ultimatley – if you

don’t accept the job – you have done for free, but it will save you masses of grief, tears and late nights if you do.

So, I have a few pointers to ‘be aware of’ while evaluating the job and to (generally) identify crappy PHP products/solutions quickly…

Continue reading

Firefox horizontal jump between pages!

For a very long time I have always been annoyed by Firefox…

Have you ever witnessed the ‘horizontal jump’ cause by your content being taller then the browser size? And the effect is when you go between pages that are bigger and within you experiance a jump.

For ages I thought it was some problem with my own CSS, but today I discovered it’s because of the vertical scrollbar in Firefox. The above affect doesnt happen in IE as it always shows the scrollbar.

The CSS to make Firefox always show the vertical scrollbar is as follow:

html { overflow: -moz-scrollbars-vertical; }
html { overflow-x: auto; }

Dinner in Rick Stein’s – The Seafood Restaurant

Laura and I recently had a weekend break in Cornwall, and since we were there we decided to visit Rick Stein’s The Seafood Restaurant.

It had recently undergone a refurbishment – in fact this was it’s second weekend open – and from the outside and the dining room itself it looked very very nice.

As it was it’s opening weekend I could only get a table for 10PM, but I decided as we were staying down near St. Ives that it would have been too late for driving back… so we were able to get swapped to a lunchtime.

We had a choice of menus there was the A la Carte menu and a special Lunch menu – as it was it’s opening month. After looking through both – we could have eaten anything – we went for the ‘special’ menu.

So… upon arriving we were greeted by friendly staff, it was very busy for lunch-time, but the staff were appeared to be equally attentive to all diners. We were not rushed to order food so we had time to choose our food… and re-choose several times! We love seafood so could have eaten anything from the menu.

Our starters were; Seafood Chowder and Quinells of Gournard.

For mains… I has Singapore chili stir-fried whole crab, while Laura had Roasted Turbot with Sauce Vierge.

To finish we had, Apple Tart Tatin and the Chocolate Fondant.

My Rating (each out of 10):???????? ????? ???????????????? ????? ????????
Food 9 | Service 9 | Atmosphere 9 | Value for money 9 | Overall 9