Design & Build – Kaweb https://www.kaweb.co.uk Mon, 11 Oct 2021 11:02:49 +0000 en-GB hourly 1 https://wordpress.org/?v=5.8.2 https://www.kaweb.co.uk/wp-content/uploads/2020/10/kaweb-favicon-150x150.png Design & Build – Kaweb https://www.kaweb.co.uk 32 32 List EU countries and ISO 3166-1 Alpha-3 code (iso3) – CSV and Array https://www.kaweb.co.uk/blog/list-eu-countries-and-iso-3166-1-alpha-3-code/ Tue, 24 Sep 2013 07:02:08 +0000 https://www.kaweb.co.uk/?p=3306 An up to date list EU countries and their ISO 3166-1 Alpha-3 code (iso3) presented in both CSV and PHP array formats.

The post List EU countries and ISO 3166-1 Alpha-3 code (iso3) – CSV and Array appeared first on Kaweb.

]]>
Updated Feb 2020 to reflect Britain leaving the EU.

You’d be surprised just how many times we have to look this up when building some e-commerce solution or other – and today was no exception.

No one else seems to have put together an up to date list of just EU countries (as of 2013 2020) and their ISO Alpha-3 codes. So here is the list in a few helpful ways, including a one line CSV, CSV with country name, PHP array and a PHP array with country name.

One line CSV


AUT, BEL, BGR, HRV, CYP, CZE, DNK, EST, FIN, FRA, DEU, GRC, HUN, IRL, ITA, LVA, LTU, LUX, MLT, NLD, POL, PRT, ROU, SVK, SVN, ESP, SWE

CSV with country


AUT, Austria
BEL, Belgium
BGR, Bulgaria
HRV, Croatia
CYP, Cyprus
CZE, Czech Republic
DNK, Denmark
EST, Estonia
FIN, Finland
FRA, France
DEU, Germany
GRC, Greece
HUN, Hungary
IRL, Ireland
ITA, Italy
LVA, Latvia
LTU, Lithuania
LUX, Luxembourg
MLT, Malta
NLD, Netherlands
POL, Poland
PRT, Portugal
ROU, Romania
SVK, Slovakia
SVN, Slovenia
ESP, Spain
SWE, Sweden

PHP Array of ISO 3166-1 Alpha-3 codes


$eu_iso3 = array('AUT', 'BEL', 'BGR', 'HRV', 'CYP', 'CZE', 'DNK', 'EST', 'FIN', 'FRA', 'DEU', 'GRC', 'HUN', 'IRL', 'ITA', 'LVA', 'LTU', 'LUX', 'MLT', 'NLD', 'POL', 'PRT', 'ROU', 'SVK', 'SVN', 'ESP', 'SWE');

PHP Array with country


$eu_iso3 = array(
'AUT' => 'Austria',
'BEL' => 'Belgium',
'BGR' => 'Bulgaria',
'HRV' => 'Croatia',
'CYP' => 'Cyprus',
'CZE' => 'Czech Republic',
'DNK' => 'Denmark',
'EST' => 'Estonia',
'FIN' => 'Finland',
'FRA' => 'France',
'DEU' => 'Germany',
'GRC' => 'Greece',
'HUN' => 'Hungary',
'IRL' => 'Ireland',
'ITA' => 'Italy',
'LVA' => 'Latvia',
'LTU' => 'Lithuania',
'LUX' => 'Luxembourg',
'MLT' => 'Malta',
'NLD' => 'Netherlands',
'POL' => 'Poland',
'PRT' => 'Portugal',
'ROU' => 'Romania',
'SVK' => 'Slovakia',
'SVN' => 'Slovenia',
'ESP' => 'Spain',
'SWE' => 'Sweden');

We hope this helps you as much as it’s going to help us!

The post List EU countries and ISO 3166-1 Alpha-3 code (iso3) – CSV and Array appeared first on Kaweb.

]]>
FileZilla will not load after force quit https://www.kaweb.co.uk/blog/filezilla-will-not-load-after-force-quit/ Wed, 17 Sep 2008 15:23:52 +0000 https://www.kaweb.co.uk/?p=3336 FileZilla for the Mac is a gem of a program for those needing a free “traditional” FTP client (alternatives being the sleek Cyberduck and the Firefox add-on FireFTP).

The post FileZilla will not load after force quit appeared first on Kaweb.

]]>
laptop typing keyboard

FileZilla for the Mac is a gem of a program for those needing a free “traditional” FTP client (alternatives being the sleek Cyberduck and the Firefox add-on FireFTP).

Recently, however, I had a problem. I created a new site with a default local directory that had over a thousand subdirectories. Upon connecting, the program began pinwheeling, presumably working its way through the many files. After a few minutes it was time for a cmd-click, force quit (ooh rhymy!). Upon relaunch, FileZilla was painfully slow to load. The FZ icon would happily bounce for a couple of seconds, but then it was pinwheel city again… one could only assume it was starting where it left off last time.

So, you’re stuck – unable to load FileZilla to change the setting that is causing FileZilla not to load. And so, as is so often the case, it’s command line to the rescue.

First, (force)quit FileZilla and open up a terminal. If you’re not already there, go to your personal user directory (/Users/yournamehere). An ls -la will reveal a hidden directory named .filezilla. Dive in and then edit filezilla.xml. The offending line reads as follows:

<Setting name="Last local directory" type="string">path/to/directory/here</Setting>

Remove that whole line, save your file, start FileZilla and enjoy port 21-action all over again! Just remember to change the local directory in the problem site before you re-connect otherwise you’ll be back to square one.

The post FileZilla will not load after force quit appeared first on Kaweb.

]]>
MSSQL Server 2005 and CodeIgniter https://www.kaweb.co.uk/blog/mssql-server-2005-and-codeigniter/ Wed, 23 Jul 2008 10:19:50 +0000 https://www.kaweb.co.uk/?p=3326 During development work on one of our larger projects, we uncovered some rather alarming problems when using php_mssql.dll in conjunction with SQL Server 2005 Express.

The post MSSQL Server 2005 and CodeIgniter appeared first on Kaweb.

]]>
database structure

During development work on one of our larger projects, we uncovered some rather alarming problems when using php_mssql.dll in conjunction with SQL Server 2005 Express. Just by perusing some of the comments over at the PHP manual, you can see that we weren’t alone.

Refreshing the page would cause the mssql_connect function to fail. A further three or four refreshes would result in further failures, until suddenly one more refresh manages to establish a connection. This situation would repeat itself, and is completely random. Despite months of trying to track it down when we had spare time, we just could not get to the bottom of it.

A few months ago, a result began cropping up on Google that appeared to contain some answers. Part of Microsoft’s data programmability team announced they were working a new driver for PHP for use with SQL Server 2005. Excellent, we thought! Of course, we haven’t been able to use this driver in a production environment yet as it is still in beta and subject to change (and change it has). However, we’ve ran tests using the driver and so far, it does appear to be more stable. The only issue is that the symptom we were experiencing is very difficult to replicate (if nigh-on impossible), and so we cannot know for sure if the driver has alleviated the problem.Parts of the project are written using an excellent framework known as CodeIgniter. We took the liberty of also writing an php_sqlsrv.dll compatible driver for it which you can download here. To use the driver, just unzip it into a folder called “system/database/drivers/sqlsrv” and change your database.php to reflect the changes (change the driver to “sqlsrv“). Hopefully this will help one person that was in the same boat as us!

The Microsoft SQL Server 2005 driver for PHP is a PHP 5 only extension. It allows the reading and writing of SQL Server data from within PHP scripts. The extension provides a procedural interface for accessing data in all editions (importantly, including Express) of SQL Server 2005 and also SQL Server 2000. The API makes use of PHP features such as PHP streams to read and write large objects.

The post MSSQL Server 2005 and CodeIgniter appeared first on Kaweb.

]]>
Sites still in Classic ASP, why? https://www.kaweb.co.uk/blog/why-are-websites-built-in-classic-asp/ Fri, 11 Jul 2008 14:22:21 +0000 https://www.kaweb.co.uk/?p=3317 From a coders point of view, coding in PHP is a hell of a lot easier with better documentation, plenty of resources available, frameworks to work in making it quicker to get the job done and you can easily adhere to best software practices.

The post Sites still in Classic ASP, why? appeared first on Kaweb.

]]>
programming in php

Classic ASP is not to be confused with ASP used in the .NET framework, the two are very different, I’m talking about Classic ASP here. Classic ASP, was first distributed with IIS (Microsoft’s Internet Information Services) back in 1996, two further releases followed in 1997 and 2000. It was Microsoft’s first server-side script that was used to dynamically generate web pages, so in it’s hayday was cutting edge. However, shoot forward to now, 2008 and there are still a load of new sites developed in Classic ASP, why? Surely given the rate at which internet technologies advance something would have come along that was better? Well it did, it’s called PHP.

Why is PHP better? Well there’s two points of view for why it’s better.

From a coders point of view, coding in PHP is a hell of a lot easier with better documentation, plenty of resources available, frameworks to work in making it quicker to get the job done and you can easily adhere to best software practices. It is incredibly flexible and can connect to a variety of databases, most commonly used is MySql database which is (in my view) a better database system to use than MS SQL, it’s syntax, extra functionality and clear documentation that MySql gives me is ace and makes any expansions/requirements needed by the client, no problem to do at all. Which is what every client wants to hear, a yes that’s possible rather than a err, well, that could be a problem.

From a clients point of view – PHP is free and doesn’t need a Microsoft platform to run on (which isn’t free, you have to pay Microsoft). The database PHP uses most commonly is MySql, which is also free, unlike MS SQL (again you pay Microsoft). The resources available in PHP are vastly greater than ASP meaning whatever a client needs from their site, it’s not a problem to do in PHP. Imagine a simple image uploading tool, in ASP you have to purchase a module _just_ to handle the images, in PHP there’s a wealth of image manipulation libraries at your finger tips at no cost.

With the purchase of River Internet we acquired some estate agent clients whose sites were coded in ASP. The next step for us will be to advise them to have their sites recoded in PHP (for which we use a great MVC framework that builds in many SEO best practices as well as other useful classes) so as to ‘future-proof’ their online marketing activity (now, in the present market, becoming more and more important as traditional advertising costs escalate).

While I’m advocating PHP here, if in another 10 years time there’s a better language out there, I’m pretty confident that we’d be using that. It doesn’t pay to be stuck in your ways when it comes to internet technologies and your clients shouldn’t have to pay for your shortcomings and not keeping an eye on trends in the future.

So for the love of all things good, can we please lay Classic ASP to rest?

The post Sites still in Classic ASP, why? appeared first on Kaweb.

]]>