Archive for the ‘Internet’ Category

Transferring domains out of 1and1.co.uk

1and1 have something of a reputation of making it difficult to transfer domains away from them and rightly so as no matter how much you look around their website, you’ll not find how to do it.

It’s actually fairly easy once you find the site that you need to do it from.

  1. login to your 1and1 account and unlock the domains that you want to transfer (you’ll find the unlock option on clicking the info tab on your domain management screen);
  2. it’s a good idea to change the name servers at this point to point to those of your new hosting service and, of course, to upload your site to it’s new location if you’ve not done that already;
  3. if you’re using whois privacy you’ll need to disable that before proceeding; 
  4. register the domain with your new registrar and acknowlodge the request when you receive the e-mail (this is sent to the e-mail address recorded for your domain so check that it’s correct by looking up the domain on whois);
  5. go to the 1and1 contracts site and cancel the parts of the contract referring to the domains that you want to transfer (set the cancellation options to “as soon as possible” and “on “change provider”;
  6. acknowledge the e-mail that 1and1 will now send you.

OK, so it’s a bit convuluted but once you know the address of the 1and1 contracts site at least you can do it.

How long does it take? It’ll take you about 15 minutes to work through all that plus a few minutes per additional domain. The transfer itself can take anything from a few hours to several days.

Copyright © 2004-2014 by Foreign Perspectives. All rights reserved.

Moving the domains: stage 2

I’ve been moving my domains away from their previous host and now have all the easy ones moved over.

Stage two is starting as you read this and involves re-registering the domains with the new registrar.

The snag is that there’s obviously a period when things are in limbo between the two so the idea is to reduce the extent of that as far as possible. You can pretty much eliminate that limbo stage if you take care in the move and do it in three parts.

  1. setup the domain on the new hosting service and load all the HTML, databases and whatnot (add a little note to yourself on the homepage of the domain to the effect that it’s on the new host);
  2. login to the old registrar and set the name servers to point to the new host;
  3. initiate the domain transfer to the new registrar and setup the nameservers to point to the new host.

If you follow the three steps, the transfer should be seamless which is why in step one it’s handy to add a note to the homepage so that you know the transfer has happened.

I say, “should be” seamless because, of course, chances are that the software on the new hosting service isn’t exactly the same as on the old one. Typically, I get caught out by my use of globals in PHP and I nearly always forget to set the relevant option which has somewhat peculiar effects on the sites. To avoid this, it’s best to have a test domain which you can try out on the new host before moving over the live sites.

Copyright © 2004-2014 by Foreign Perspectives. All rights reserved.

Mixing and matching database contents

One of the perennial problems that you have when trying to use information from someone else’s database is that they never code the information in quite the same way.

If the external database is one from an unrelated company on the Internet then the only way around that is to create a little translation routine or, if you’re lucky and it’s only the names that are different, a translation table.

From a purely practical point of view, the table is the way to go if that can be accomplished and that’s what I’ve done in stage one of the roll-out of the integration of a propery feed for my listings sites. Simple things such as my use of the proper name for the Algarve (ie “Faro”) whereas they use the more popular “Algarve” are easy to allow for like this and indeed just doing that this morning as bumped up the percentage of information that I’ve been able to include quite considerably.

Why not just rename things in my own database? I could do that at the moment but the problem is that I intend to integrate other databases in due course to improve the coverage of my own site and at some point I’ll need to be able to translate terms as there’s no common usage of terms across the various databases that I’m looking for.

Where things get much more difficult is if the basic structure of the information provided by the external system is radically different from that which your own system uses and then you can potentially be talking of quite a bit of work. Unfortunately, there’s no easy way around this.

Copyright © 2004-2014 by Foreign Perspectives. All rights reserved.

Adding XML processing to the websites

Although I’ve been running database driven websites for a couple of years now what I’ve not done before is to access other peoples’ sites from my own until now.

A common way to offer people access to corporate databases via the Internet is by way of providing an XML feed. What’s XML? Well, it’s a way of holding offering both the data and the data structures via a webpage. It looks a little bit like normal HTML in that it uses the <angle> brackets but other than that it’s completely different.

The problem is that it’s a very general purpose format and not tied to any particular language. In my case, the site that I wanted to access provided examples in ASP but I use PHP so they weren’t a whole lot of use to me. Neither as it turns out was the big book on XML that I’d bought to get me on the road with the development.

However, as always there’s a lot of help around on the Internet if you look in the right places. After a few abortive attempts I found the PHP routine clsParseXML which provides a very simple yet powerful interface to XML data. Essentially what it does is to read the XML file and return it in an array or rather an array of arrays.

The database I wanted to access is essentially one large structured list of place names around the world each of which have a list of diffent accommodation at them. So, first of all I had to read the entry which listed all the regions ie Africa, Asia, Europe, etc., then choose the code for the region I was looking for and run the query again to get the countries in that region, and so on down to counties. Within the lowest level there’s a link to properties in that area requiring a whole new qyery.

Sounds very complicated, doesn’t it? Actually, it’s very simple and the high level queries run to only a few lines of code:

  • region_id=get_region_id(“0″,”Europe”);
  • region_id=get_region_id(region_id,”France”);
  • region_id=get_region_id(region_id,”Languedoc-Roussillon”);
  • region_id=get_region_id(region_id,”Pyrenees Orientale”);

Which gets me a region_id for the properties in the Pyrenees Orientale. With that I call another routine to scan through the properties in that region and return an array containing all the information of properties there.

With that, I was able to run up the HTML to integrate the properties on the external database with those from my own database thus giving, for example, the Languedoc-Roussillon page where the only way to identify the properties from the external database is by the “VR” prefix to their reference numbers.

How long to complete? Well, I started yesterday afternoon and had the test version running in a couple of hours with the live version completed in under an hour this morning. However, in reality it took much less than that as a lot of the time went in looking for that critical routine to read XML into a PHP array.

The game plan was to roll out this development to my sites listing properties around Europe but unfortunately the external database isn’t structured in the same way as my own outside France so I’ll need to run up some code to translate between the two structures first.

Copyright © 2004-2014 by Foreign Perspectives. All rights reserved.

Website technology upgrading

When you’re plugging away on your own with a bunch of websites, it’s easy to fall into the trap of not keeping things up to date. After all, the websites are doing quite nicely, so why bother messing with them?

Thankfully, I have a friend who runs a smaller stable of websites who acts as the competitive spur for me and, sometimes, I for him. For instance, I was quite happy with the adsense income that I was getting ’til I heard how much he was getting so I started working out why he was getting lots more and ended up having quite a jump in income from that source as a result.

Where we differ is that his sites are more general travel guides whereas mine are more concentrated in the accommodation listing area which means that it was fairly simple for him to slip in affiliate links supplying accommodation listings to his sites but it’s much more difficult for me. Or, at least I thought so. He’s moved on to his second generation version of integrating the accommodation feeds into his sites which looks like being a lot easier than I had expected it to be.

Sooo, I’m just about to start work on the “second generation” integration level that he’s already using which should ultimately let me popular my sites in most of the countries around the world.

Funnily enough, it will be simpler for me to do that integration as my little stable is database driven whereas his are hand written pages for the most part. This means that adding one bit of code to a single page will be enough to populate all of the pages of each series of sites that I apply it to. Now, “all” I need to do is to get that one bit of code written and working!

Copyright © 2004-2014 by Foreign Perspectives. All rights reserved.
Archives