whiteland


Whiteland Ltd (UK)
Whiteland Poland (PL)
Internet software and services

2010/03/13

How to use your mobile phone as a modem on iPlus in Poland

I use Neostrada from TP as my internet service provider from my home-office but as a back up solution and for when I am travelling I want to be able to connect to the internet via my Noka E51 mobile phone which I have on a contract with Plus.

For windows users it’s no problem to use the free Nokia connectivity software.  But because I only use Ubuntu I can’t use their software so I need another solution.

The answer is the linux tool Wvdial which allows your computer to make a modem connection.  All I had to do was configure the config file at /etc/wvdial.conf as follows:

[Dialer Defaults]
Init1 = ATZ,”IP” “INTERNET”
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyACM0
ISDN = 0
Phone = *99***1#
Password = A
Username = B

Then to use it I just plug my mobile in with the USB cable I got with the phone and run:


sudo wvdial

On iPlus I can by a monthly allowance of 100MB of data for 8 zloty which I think is good value and is more than enough data for me to check email and surf the net.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • MisterWong
  • Netvibes
  • Propeller
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz

2010/03/12

Determining Country by IP Code

Today I needed the ability to determine which countries visitors are coming from for one of my websites.

I considered working out the country based on which languages the visitor’s browser is happy to accept, but decided I wanted something more accurate than that.

In the end I decided to use an IP-based solution and so downloaded the CSV file from http://software77.net/geo-ip/ which is a great tool to be able to quickly map countries to IP addresses.

Then I created a table in MySQL to hold this data:

DROP TABLE IF EXISTS `ipLocation`;
CREATE TABLE IF NOT EXISTS `ipLocation` (
`id` int(11) NOT NULL auto_increment,
`ipFrom` int(11) NOT NULL,
`ipTo` int(11) NOT NULL,
`reg` varchar(50) null,
`assigned` int(11) NULL,
`countryCode` char(2) NULL,
`countryAbbr` varchar(5) NULL,
`countryName` varchar(50) NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Then from the command line I ran the following snippet to import the CSV data into the table.  Note that I am using user root with no password (yeah naughty I know, but it’s only my dev box).  You will also need to change the path location from the one shown:

mysqlimport -uroot bip "/home/ben/ipLocation.csv" --columns=ipFrom,ipTo,reg,assigned,countryCode,countryAbbr,countryName --default-character-set=utf8 --fields-terminated-by=, --fields-enclosed-by=\" --lines-terminated-by="\n" --local --delete

I personally don’t care about some of the columns such as when the IP address was assigned, or the countries’ 3 letter abbrevation codes so I dropped them:


ALTER TABLE `ipLocation`
DROP `assigned`,
DROP `reg`,
DROP `countryAbbr`;

Finally to speed up query access time I indexed the ipFrom and ipTo fields:


ALTER TABLE `ipLocation`
ADD INDEX ( `ipFrom` ),
ADD INDEX ( `ipTo` );

Now your website can grap the REMOTE_ADDR header from the webserver, convert it to a long number with something like this:


$blocks = explode('.', $ip);
if(count($blocks)!=4) return 0;
return ($blocks[0] * 16777216) + ($blocks[1]*65536) + ($blocks[2]*256) + ($blocks[3]);

and then look up the country code with a query like this:

SELECT countryCode FROM ipLocation WHERE ipAddress_as_long BETWEEN ipFrom And ipTo

And now you have a free, quick, easy and fairly reliable way to work out the visitor’s country. For more accuracy you should update the table with fresh data periodically.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • MisterWong
  • Netvibes
  • Propeller
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz

2010/02/22

Buy Dishwashers

Our latest website “Buy Dishwashers” at www.buy-dishwashers.co.uk has just been launched with over 2,200 dishwasher appliances in stock and price checked daily.

Buy Dishwashers lists appliances from every major UK supplier such as Comet, Currys and Dixons.  We also stock from online retailers such as Amazon and Tribal UK, plus specialist suppliers like Kitchen Science, Appliance Deals and Appliances Direct.

With 18 stores stocking 34 brands, Buy Dishwashers is the best place to find the best deal on the best dishwashers.

At the time of writing the  top five searches are:

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • MisterWong
  • Netvibes
  • Propeller
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz

Comet Coffee Makers

Comet have currently got a discount voucher code on selected coffee makes.  Enter 10COFF as the promotional code at the checkout to get a 10% discount.

This discount includes the Delonghi Bar and Bosch TAS4011 best sellers.

Compare prices on these and all other coffee makers at Best Coffee Machines UK

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • MisterWong
  • Netvibes
  • Propeller
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz

Best Offers and Voucher Codes

Tribal UK have got some crazy prices going on – check out these three price searches on Buy Washing Machines:

Hotpoint WMD960P – Tribal UK’s price today is £317 which is a fiver cheaper than the next cheapest (Electrical123.com) and &pound140 cheaper than Littlewoods!

Hotpoint WMD960G – £319 at Tribal UK which is £20 cheaper than anybody else and a massive £160 cheaper than Littlewoods.

Hotpoint AQ9D69IV – £399 at Tribal UK which is just a silly price.  The only other two stores who are stocking this digital washing machine are charging £579 (Bennetts) and £599 (Currys).

Buy Washing Machines updates its stock list twice a day so you always have the latest prices. Find the cheapest washing machine appliance deals online.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • MisterWong
  • Netvibes
  • Propeller
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz

2010/01/21

Buy Washing Machines

The latest website developed by Whiteland Ltd has just gone live at http://www.buy-washing-machines.co.uk.

Buy Washing Machines currently lists 1000 washing machines from 14 suppliers such as:

The stock list has 40 different manufacturers including top brands such as

All stock information including prices and availablity is  updated everyday to help the user  find the best deal on washing machine appliances.

Site visitors can compare prices on front load washing machines, top load washing machines and integrated washer appliances.

The site has an intelligent search page, a ‘most popular’ page to track the 10 most popular washers in real time plus contact and links pages.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • MisterWong
  • Netvibes
  • Propeller
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz

2010/01/18

Best Steppers

The latest in the ‘Best’ chain of gym equipment comparison websites has just been launched at www.best-steppers.co.uk.  This complements the already existing sites offering a range of fitness products:

Best Steppers currently stocks 90 steppers, mini steps, thigh trainer steppers, air gliders, twist steppers and swing steppers from 13 UK suppliers including high street names like Littlewoods, Tesco and Sainsbury’s plus specialist stores like Gym Company and Sweatband.com

The most popular selling products are:

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • MisterWong
  • Netvibes
  • Propeller
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz

2010/01/12

Best Coffee Machines

Best Coffee Machines has now gone live with 350 coffee machines from 10 UK suppliers.  This website allows users to find the most popular coffee machines such as the krups dolce gustoDelonghi Espresso and Cappuccino Maker or the Gaggia Nautilus coffee maker.

Best Coffee Machines is a UK comparison website which lists the most popular brands of coffee machine including:

Users can compare prices from top online stores such as Sainsbury’s, Littlewoods and Amazon.  Prices and stock are updated daily.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • MisterWong
  • Netvibes
  • Propeller
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz

2010/01/11

Bad Robots Trap

Recently I set up a new tool to try and reduce the annoyance factor of “bad bots”.  To this end I set up a bot trap on Best Exercise Bikes based on the code in use at http://danielwebb.us/software/bot-trap/

Any IP address that falls into the bot-trap now gets banned from not only Best Exercise Bikes but also from every other partner website on my server including the newest sites Best Coffee Machines and Best Steppers.  The log of banned IP addresses is publicly available here: spammers.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • MisterWong
  • Netvibes
  • Propeller
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz