How to run server side PHP scripts on my computer

25 February 2009

When testing a website on your computer you will find that you can view HTML files and link to all the images and CSS files easily.

The problem comes when you add a .php file extension and then try opening in with a web browser - all you get is a dialog to download the PHP file, which is not what we want, we wanted to view the web page as it should be, not download all the source code.

For this reason I decided to investigate running server side scripts on my local computer.

The result I came up with was called XAMPP.

XAMPP runs on your local computer as an Apache server and can handle PHP scripts and also has built in phpMyAdmin which allows you to create an online database, except not online - just on your local computer.

You can re-create the complete online experience and get everything about our website ready and tested and then export your phpMyAdmin databases and import them to your actual online database area, and also you'll just need to upload your files and all should be fine - As long as your web server is running the same version of PHP as your local virtual Apache server.

I've heard there's also other server side applications that you can use - although I wouldn't want to recommend them as I've never personally used them myself.

The XAMPP website where you can download the application is

Permalink     Comments (0)     Trackbacks (1)

Share this on Facebook  Share on Twitter   Google  Yahoo  Technorati  Reddit  Digg

FTP (File Transfer Protocol) Applications

24 February 2009

FTP stands for File Transfer Protocol - the protocol used to connect to a web server in order to transfer files, either uploading to the web server or downloading from the web server.

When you have a wed domain hosted on a web server you will either need to create an FTP account in order to transfer files, or an FTP account will already be setup for you.

You will need the FTP host, username, password and in some cases the remote folder (the folder on the web server that you will be connecting to).

Once you have these details you need an application in order to connect.

You can FTP to a web server direct from Microsoft Windows if you open any Windows Explorer window, display the address bar and then type in ftp:// followed by your FTP host address plus any remote folders that you need to connect to. Next a dialog box will pop-up and ask for your username and password.

Or other applications I've used include

Or the one that I use 99% of the time is built in to Macromedia Dreamweaver, which now the newer version Adobe Dreamweaver CS4 is out.

Permalink     Comments (0)     Trackbacks (1)

Share this on Facebook  Share on Twitter   Google  Yahoo  Technorati  Reddit  Digg

How to add Google search to your website

23 February 2009

As we all know the Google search engine is the most used search engine.

So what if people could do a Google search direct from your website?

What if this Google search on your website only searched your website?

What if it was really easy to add the Google search to your website?

Silly to say no.

You can go to or have a look at my code below

<form method="get" action="">
<input type="text" name="q" maxlength="255" value="" />
<input type="submit" value="Google Search" />
<input type="checkbox" name="sitesearch" value="" checked /> only search Your own website

Above is the code you need, but you may also want to lay it out a bit differently.

If we place it all inside a box with a 1 pixel border and then line space things correctly the code will look like this

<div style="border:1px #000000 solid; width:280px; padding:7px;">
<form method="get" action="" target="_blank">
<p style="margin:0px;"><input type="text" name="q" maxlength="255" value="" />
<input type="submit" value="Google Search" /><br />
<input type="checkbox" name="sitesearch" value="" id="only_this_site" checked /> <font size="small><label for="only_this_site">only search this website</label></font></p>

You can style it differnetly using CSS and you can chose to remove the "Only search this site" part, which will mean it will search the whole of the Internet.

This code will open Google in a new window or tag, and then it will be the normal Google view but with your search results already visible.

Have a try on my example above if you don't believe me!

Permalink     Comments (1)     Trackbacks (0)

Share this on Facebook  Share on Twitter   Google  Yahoo  Technorati  Reddit  Digg

What's wrong with Internet Explorer?

22 February 2009

Internet Explorer has always been a very popular web browser and this is probably because Microsoft Windows comes with Internet Explorer built in, and already set as the default web browser.

A few reasons why I advise against Microsoft Internet Explorer

  • Websites are not rendered correctly
  • The CSS box model is not followed
  • A lot of CSS syntax is not recognised and so doesn't display the website correctly
  • When a new version of Internet Explorer is available it won't automatically update itself and install the newest version - which is why a lot of people still use Internet Explorer 6 which is virtually impossible to compensate for these days
  • Internet Explorer has had major security breaches, as shown on BBC
  • It's Microsoft and so probably doesn't go through any testing phases
  • There aren't as many extensions and add-ons as other web browsers

Instead of Internet Explorer I would recommend

Internet Explorer 8 is now ready for people to download and start using also - however there is likely to still be some minor bugs as its only in RC1 (Release Candidate 1) status. Release candidate software is ready to be evaluated by users while it undergoes final testing.

Permalink     Comments (0)     Trackbacks (0)

Share this on Facebook  Share on Twitter   Google  Yahoo  Technorati  Reddit  Digg

Too many Twitter followers?

21 February 2009

Yesterday I clicked to follow over 100 other Twitter users, and then again today I cicked to follow about 100 more.

But does this matter?

On Facebook and other social networking websites I'd only add people who are actually contacts or friends that I assoiate with, have worked with or have met whilst networking. This is because other social networks show personal information and are ways to stay connected to friends.

Twitter holds no personal information about me, except for a photo.

In my eyes, the more Twitter followers I have, the more visibility my Twitter updates will have, and so more traffic that will be generated to my blog entries.

Although I'm following a lot of Twitter users it doesn't mean they can see my Twitter updates - unless they add me as well.

My hope is that if I add 100 Twitter users, then at least 20% will follow me back.

At the moment I plan to add Twitter users of similar interests, and hope they also see the value, and follow my Twitter updates as well.

Permalink     Comments (0)     Trackbacks (0)

Share this on Facebook  Share on Twitter   Google  Yahoo  Technorati  Reddit  Digg

Windows keyboard shortcuts

20 February 2009

Built into Windows are many ways in which experiences Windows users can speed up normal day-to-day tasks.

Windows has the following ways to carry out the same functions

  • The toolbars that you'll often find at the top of Windows applications and some of the Microsoft Office applications - These can be seen by all user and can do common tasks
  • Right click on something - Right clicking will bring up a particular menu that refers to the object your mouse is currently over only. If you're on a word you're likely to get a formatting and dictionary type menu, whereas an image you may get a picture toolbar, properties or "save image as" type features
  • Keyboard shortcuts - Quite often a lot of tasks can be carried out by using the keyboard alone. In fact, did you know, without the mouse you can actually do everyday tasks on Windows using just the keyboard!

If you look at the top of your web browser window you will see some menus, probable "File", "Edit", "View", etc.

You may also notice that certain letters are also underlined.

Try holding down the "Alt" key on your keyboard (next to the space bar) and then pressing a letter that is underlined. Like hold "Alt" and press "F". You will notice the "File" menu has opened. Now again you see more underlined letters so you can now do the same again and carry out the tasks in the menus.

Or if there is no underlined letter in one menu, try using the arrow keys on your keyboard to scroll up and down the menu items.

Now when it comes to Microsoft Office's Word, there are also so helpful copy and paste shortcuts.

In fact, it works pretty much anywhere on your computer. Highlight a word on this website for instance, and then try and of the following tasks using the "Ctrl" key and shortcut key

  • "Ctrl" + "A" - Select everything within the selected window
  • "Ctrl" + "C" - Copy the text that has been highlighted to your clipboard
  • "Ctrl" + "V" - Paste the latest items from your clipboard
  • "Ctrl" + "X" - This only works on text that can be edited, as appose to text that is read only (like pdf documents or websites) - but this shortcut cuts the text off of the page and places it onto the clipboard
  • "Ctrl" + "F" - Search the current contents of the current window
  • "Ctrl" + "Z" - Undo the last change you made, however this may not work on every window so do not depend on it
  • "Ctrl" + "Y" - Redo the change that you have just undone
  • "Ctrl" + "S" - Save the current window
  • "Ctrl" + "P" - Print the current window
  • "F1" - This shortcut doesn't work in every case - but will usually pull up any help files for the current window

When using web browsers you also have others like "Ctrl" + "B" will bookmark the current webpage that you're on.

Try out a few of the examples above and then try using them in a day to day basis - you'll find that the "Ctrl" + <key> shortcuts really do speed up a lot of tasks, whereas scrolling through the menus you may find easier just to use the mouse.

Permalink     Comments (2)     Trackbacks (0)

Share this on Facebook  Share on Twitter   Google  Yahoo  Technorati  Reddit  Digg

How does a website rank high in search engines?

19 February 2009

All search engines will use different algorithms and ways of ranking websites, but they all have the main objectives in mind.

For starters - any new website may take up to 3 months to first be crawled by search engines. This also means if you change your website, or hire an SEO (Search Engine Optimisation) company to work their magic then again - it may be up to 3 months before you notice a difference.

Good web standards always help, as this makes all your content as easy as possible for the search engines to read your content.

When search engines look at your website they don't use your style sheets and so they just see un-formatted text.

Search engines can only read text, so flash productions will not be recognised, and complete websites built in flash are a bog no no, unless there's a text only version OR unless other SEO techniques are carried out extremely well (like link building - which we'll talk about later).

Images again are not seen by search engines, instead the search engines read the alt text which is added in the <img> tag when inserting an image into a website.

After good structure you need to ensure that you have good, keyword rich, copy.

First think of what people might search for in order to find the page. Make a list of keywords and key phrases (multiple keywords together) and make sure that these keywords and key phrases are used sufficiently throughout your page - but don't overdo it as search engines may think that you're trying to cheat them.

Which brings me nicely onto my next point - don't try and cheat search engines, as if they find out you will get black listed. C S Shyam Sundar's Thoughtpad.

Some ways that seach engines see as cheating are (and this is not the complete list)

  • Text on the same colour background
  • Text so small that it can't be read
  • Creating doorway pages - Pages filled with keywords but then do an automatic redirect to the content page, so search engines see all the keywords, whereas users get redirected on and don't see all the keywords on the doorway page
  • Blocks of keywords that would not be found in normal standard grammar
  • Areas of keywords that are hidden, or have a website element planted over the top

As well as these ways to get blacklisted, there is also a list of ways that penalise you in search engine rankings. These points don't blacklist you completely, but lose you page rank points.

This list, again, is not every way of getting penalised, but just a few to get you thinking

  • Don't link to your website from lots of small, spam-like websites as this will bring your overall page rank down
  • Only link to your website from other websites containing similar content - as this shows search engines that your website is a good resource, not just link building
  • Don't buy links to your website because, firstly a lot of website that promise this are scams and don't work, and secondly if you build too many links too quickly - again search engines may think that something's up
  • If you ping your website or blog to ping enabled websites then be sure not to do this too often as they may see you as spamming
  • Try to avoid query strings in your URLs as search engines can only crawl these for so long. Try and use user and search engine friendly URLs
  • Do not have a lot of redirects around your website
  • Search engines don't spend long on each page - just think how many pages they have to crawl! And so make sure that your page load time is fairly quick
  • Have text on your page, rather than images containing text - as like I said search engines can't read images, only the alt text. Some CMS (Content Mangement Systems) automatically convert text to images using JavaScript - this is not always a good idea

A difference between Google and MSN Live is

  • MSN Live likes a lot of outgoing links from your website - as this shows that your website is helpful acting as a portal directing people to other useful websites
  • Whereas, Google, likes a lot of incoming links as this means that other people think that your website is helpful and informative and so you should be ranked higher

I can see where both search engines are coming from - but if we look at the facts - over 80% of Internet searches are carried out using Google, and so for this reason alone I'd follow Google's advise. Also the more links back also means that people might happen to click on this link and therefore drive more traffic in your direction.

Because Google is the most popular search engine I would always do things to Google's standards and best practice.

Permalink     Comments (0)     Trackbacks (0)

Share this on Facebook  Share on Twitter   Google  Yahoo  Technorati  Reddit  Digg

Valentines day

14 February 2009

It's that time of the year again - 14th February - and we all know what that means...

Time to spend more money!

Shops really do find any reason to make us spend more.

January - New Years
February - Valentine's day
March - Mother's day
April - Easter
June - Father's daty
November - Fireworks night
December - Christmas

I'm sure there are things in the other months as well... But I can't remember!

So Valentines day is the day to:

  • Tell that one person how much you love them, buy them lots of presents (usually chocolates, teddys, flowers, pink stuff, heart shaped stuff, etc.)
  • Write them a card with a poem in
  • Take them out somewhere nice (usually an expensive meal)
  • Have a photo taken in a photo booth (just one of those random romantic things that people do)

Now don't get me wrong, I'm not having a rant about Valentines day or anything, I just think that it's a bit over-exaggerated by a lot of shops.

And at the same time, for anyone who's single, it just rubs it in there face and makes them feel lonely and un-loved.

Happy Valentines day everybody :) x

Permalink     Comments (1)     Trackbacks (0)

Share this on Facebook  Share on Twitter   Google  Yahoo  Technorati  Reddit  Digg

Google Checkout Vs PayPal

12 February 2009

I decided the other day that I wanted to look into ways of selling on my website.

As I am already signed up to a lot of Google products and have no complaints about any of them I thought I'd give Google Checkout a try.

I went through the whole setup process and then put a button on a page, however, at this point I couldn't see any options to test the checkout before making it live, so I did some Google searching.

I found an article about making the test area in so I went in and had a look around.

To test the account I first had to create a new Google account, as you can't use the same Google account to sell the product and buy it. This was a lot of hassel, but I knew that the results would be good so I carried on anyway.

I tested it all and all was fine... However... I want to be selling electronic items like eBooks and applications, and for this it needs to go back to a custom thank you page so  that I can give the customer the link to download the product.

Google Checkout didn't offer this. I looked around a few websites and forums but couldn't find the answer and so I emailed Google. Here is an excerpt from there reply to me:

"Thank you for your email. I understand you'd like to redirect your buyers
to a thank you page post purchase.

Please know that Google Checkout does not provide the ability to
automatically redirect a buyer to the merchant's site after a purchase,
though this feature may be introduced at some point in the future. Please
note that the API offers a <continue-shopping-url> element that will
provide a link on the buyer receipt page. This 'continue shopping' link
will allow the buyer to return to your site should they choose to. Please
for more information about the element."

So after finding out that they couldn't do it, I turned to PayPal.

I signed up for PayPal and had a look around their very large, complicated website and just got a bit baffled!

To be able to start using the service properly I need to verify my card and so I'm waiting on my verification numbers to come thorugh... And then I will share more.

In conclusion - I'd much prefer to use Google Checkout as it's quite easy to use and not too complicated, however as they can't do what I need, I have to turn to the complicated option of PayPal.

Fingers crossed that when my account is verified it will do what I need it to do.

Permalink     Comments (0)     Trackbacks (0)

Share this on Facebook  Share on Twitter   Google  Yahoo  Technorati  Reddit  Digg

What is a permalink?

11 February 2009

Permalink is short for permanent link.

It is a link that isn't going to change, even when the blog entry is archived.

For example, on this blog there is 4 ways to see blog entries

  • The last 3 entries written are shown on the main blog page
  • When selecting a year it will show every entry from that year
  • When selecting a month it will show every entry from that year in that month
  • And when selecting a blog it will show just that blog along with that blog's comments and trackbacks.

Every place where the blog can be seen all have the permalink link where the blog can always be linked to.

Having a permalink ensures that search engines won't find broken links to blog entries.

Trackback links are quite similar. Trackback URLs do refer to the permalink, but going to the trackback URL won't display the blog entry.

On the trackback URL is where the ping is recieved from other websites, checks for spam and then responds to the originating website of the ping to say that either the ping was successful, or that the ping failed.

Permalink     Comments (0)     Trackbacks (0)

Share this on Facebook  Share on Twitter   Google  Yahoo  Technorati  Reddit  Digg