Archive for June, 2008

Get Working Days between 2 dates with PHP

Monday, June 30th, 2008

We needed to work out the working days between two dates for a small calendar application we had to write. After looking round the net for a few minuets we decided to write a quick function for ourself.

It takes 3 inputs. A From Date (Epoch) , a To Date (Epoch) and an array with Bank Holiday dates in it. By the time it has finished it has a variable $WorkingDays with the number of working days in the give range.

The main logic goes like this

while ( $StartTime <= $EndTime ) {
if (
date(”D”,$StartTime) == “Sat” ||
date(”D”,$StartTime) == “Sun” ||
array_key_exists(date(”Ymd”,$StartTime),$BankHolidays) ) {

$IgnorDays++;

} else {
$WorkingDays++;

}

$StartTime=$StartTime+86400;
}

What is Optimised Website Design

Sunday, June 29th, 2008

Optimised Website Design so what is it?

Optimised Website Design is the process of making a website very easy for search engines to read and catalogue, and yet still making the site easy to use for its intended audience.

The main thing to remember is “Then Content is King”, if your site layout is great but you have little or no relevant content to the search terms your are trying to achieve it will not work.

12 Simple Rules to Follow for an Optimised Website

  1. Make sure all the pages are W3C compliant
  2. Make content on each page relate to the page
  3. Make Page name relevant
  4. Use the alt tag on every image
  5. Use the title tag on every href
  6. Use the dfn tag for acronyms
  7. Make sure you can get back to the page you came from
  8. Have appropriate meta tags on the page for the content
  9. Make sure that there are no broken links
  10. Use h1’s and h2’s
  11. Regularly add content. A page a week is good
  12. Keep going and don’t give up, you will get there

If you want more information or Free advice please feel free to contact me at Wrekin Web Design Tony

Why we like PHP

Saturday, June 28th, 2008

For many years we have used many different programming  languages  including COBOL , Rexx ,  VB , Perl .
About 6 years ago we decided to try PHP in place  of PERL for our CGI scripts and was amazed at the speed difference between the 2.

Even now we find new functions each day last one we found was the ” array_key_exists ” a very useful little function that saves checking all keys in an array.
We used it in a small calendar application for checking if a date was a bank holiday
More to Follow….

IMCA Independent Mental Capacity Advocacy Service in Powys

Saturday, June 21st, 2008

The Mental Capacity Act 2005 in 2007 introduces the new statutory role of the Independent Mental Capacity Advocate (IMCA) to support people who lack capacity to make certain decisions. IMCAs are vetted, nationally trained and comply with a code of Practice.

The Community Health Council The Community Health Council in Powys can help in any matter where the General Public have dealings with the NHS.

Please visit their website at Montgomeryshire Community Health Council or you can call them on 01686 627632

Optimsed Website Design

Saturday, June 21st, 2008

By utilising the latest technologies and techniques, Midlands Production ltd can produce a website that is easy to use by its intended users and is very easy for Search engines to catalogue and index.

Prices start from just £500.00 plus vat for a 10page website.

You can contact them at http://www.mplhost.com