SEO Blog

Optimising Adwords Campaigns - January 31st, 2007

An important part of search engine marketing is the optimisation of Google Adword campaigns. Web trafficking and searching is constantly changing it is important you regularly optimise your Adword campaign. A carefully optimised campaign will greatly increase your changes of a better ROI (Return on Investment).

I thought I would use this Blog to provide you with a few tips, ready…

  • Organize you Adwords into manageable groups by theme, products, brands etc
  • Vary your keyword matching types to ensure more relevant traffic
  • Change the display URLs to match your keyword or Ad group name
  • Ensure the destination URL of the ad, takes the user to the page they want
  • Use negative keywords to ensure your ads don't display on irrelevant searches, e.g - free (if you don't sell any free products)

That's it for now. I will provide some more tips in future Blogs.

Here at Just Search we will regularly manage our Adwords campaigns, to ensure they perform at their full potential.
Interested? Simply fill out our online form and we will get back to you.

Paul Spreadbury
SEO Programmer

Listen to this podcast Listen to this podcast

Creating tools for SEO - January 30th, 2007

One of things we do during the search engine optimisation of sites on a daily basis is the creation of sitemaps. If the site is dynamic and driven by a database then this is just a case of putting together the right SQL statement in order to get a sitemap that looks right.

For sites that are static HTML pages this can be case of just going through each page in turn to get the URL and put this together with the title to create a list of links. To speed things like this up we create custom tools that generate sitemaps for us, and I thought I would go through how to start creating a program in PHP that generates a sitemap for a site.

Those of you who are familiar with PHP will probably be aware of the fopen function. This function is used to create what is called a handle that can be used to read or manipulate a file. The fopen function has two paramters, one is the file name (including directory is needed) and the second is a flag that tells PHP what to do with the file once it has a handle. For example, using the flag "r" will open the file and put the pointer at the beginning, ready for reading the content. Using the "w" will open the file, delete the contents and put the pointer at the beginning of the file. There is a full list of different flags on the PHP website, but be you can see that you need to be careful with the type of flag that you use.

You can use the fopen syntax as follows:
$handle = fopen("/directory/file.txt", "r");

So why is this useful? Well it is not normally realised that you can also open a URL in the same way. Obviously you can´t overwrite a file using this technique as you don´t have write access, but you can read it no problem. This means that you can download the code of a website, but you need to use one method or the other depending on which version of PHP you are using.

For example, with PHP4 you can use the fread function just in the same way as you would read any other file, but you can´t tell how big a file on a remote host is so you need to nibble away at the file 8192 bytes at a time until the file has been downloaded.

Alternatively, using PHP5 you can use the stream_get_contents function which actually does the same thing, as the PHP4 method, but has extra error handling and time-out protection built in. Use the following bit of code to use one method or the other dependent on the version you are using. The variable $urlh is the file handle created by fopen.


$contents = "";
//check php version
if(phpversion()>5){
 $contents = stream_get_contents($urlh);
}else{
 while(!feof($urlh)){
  $contents .= fread($urlh, 8192);
 };
};

You can now use the $contents variable to do whatever you want.

One issue that you may come across is when the site you are looking at is behind server side authorisation. To download the contents of the site you need to force a HTTP/1.0 request into the URL. As in the following:


fopen("http://username:password@www.example.com","r");

Having now downloaded the page contents you can now do what you want. To create a sitemap you would look through the page for all the links and then feed that back into the content downloader to download the contents of the pages the links point to (as long as they are internal). This information can be used to create a sitemap.xml file, which you can then use to create a urllist.txt and a HTML sitemap. I hope you find these hints useful for your own tool development.

Philip Norton
SEO Programmer

Listen to this podcast Listen to this podcast

« Previous Entries