to homepage
 Weekly emails: how to advanced search
 Glossary lookup:


> how to > AppSwitching diary

Tuesday, May 07, 2002

Pointing RSS links to anchors on the weblog front page

Instead of pointing to permalinks, some Pro2rss users will prefer to point the links in their RSS feeds to anchor points on their main weblog page. Making this happen is simply a matter of adapting the code so that it isolates the BlogItemNumber from the permalink and then appends it to the filename for the main weblog page. I will include this as an option in a future version of the service. In the meantime, here are some instructions to amend the PHP code if you want to implement this now by running it on your own server.

Thanks to Tim McCormick for requesting this feature via the Blogger Pro developer's group on Yahoo!, for use with his Open Content List weblog: "I'd rather readers be driven to my home page, instead of to the (as-yet unformatted) archives; but I'd want readers to be taken to the right place on the page, not just to the overall page URL."

One drawback with this method is that if a visitor has followed an older link, the item will no longer be showing on the home page. But no real harm is done, since they won't see an error message — their browser will simply ignore the anchor reference and display the current page. Many blog owners will prefer that, rather than routing visitors directly to an archive page. (It also avoids sending visitors to a non-existent page if Blogger's archiving bug means it fails to publish a new archive at the beginning of the month — aaarghh!!).

The code that needs to be amended is near the end of the PHP file, in the 'if' statement for the get_link function. You will need to change all the lines between function get_link($body, $url) { all the way down to return $linkurl; and replace them with the following:

function get_link($body, $url) {
  if (stristr($body, "rssi2\" href")) {
    $permlink = stristr($body, "rssi2\" href");
    $linkname = strstr($permlink, "#");
    $linkname = substr($linkname, 0, strpos($linkname, "\""));
    $linkname = trim($linkname);
    $linkurl = $url . $linkname;
    return $linkurl;
This code locates the permalink, strips out everything in front of the '#' and then isolates the item number for the entry. Finally it adds the item number as an anchor name on the end of the URL for the main blog page.

IMPORTANT NOTE: This only works if you input the full file name of the main blog page (eg when you run the program, because anchor names won't work if you put them straight after a slash.

posted by Phil 2:04 AM (GMT) | comments | link

Monday, May 06, 2002

Hosting provider set up unwanted DNS entries

The glitch last week that meant Pro2rss didn't work for my own blog was finally resolved on Friday. It had been caused because Hostcentric, in common with most shared hosting providers, assumes that it will be hosting its customer's DNS, and therefore its own nameservers were redirecting all requests for the domain back to this server, even though the domain is actually hosted elsewhere. Although Hostcentric had changed the domain name in their server records last Monday in response to our support call then, they forgot that they would have to change their nameserver entries as well.

It's quite disturbing really to find that the simple act of declaring your domain name at the time you set up your hosting account (something you're forced to do by virtually all shared hosting providers) automatically generates these unwanted nameserver entries, which aren't documented in any of the support information for the hosting service. It's a handy illustration of the pitfalls that lie in wait for those of us who choose to do things differently.

posted by Phil 11:40 AM (GMT) | comments | link
Why you should host DNS separately

Hosting DNS separately is a small extra expense that repays itself in many ways. The domain name system (DNS) is responsible for matching your domain name (eg to the numeric IP address of your server (eg So if you follow the usual practice and host your DNS server at the same provider as your physical server, there's absolutely nothing you can do if your provider goes out of action for any reason. Whereas if you host DNS separately, you decouple the management of your domain from the individual hosting provider, and you can easily reroute traffic for your domain to another server elsewhere at any time.

A further advantage is that providers who specialize in hosting DNS will do a better job of it than normal web hosting providers. They allow you to host a selection of subdomains on different servers, or even to map individual subdomains to specific URLs. Most of them distribute their nameservers across multiple locations so that if one of them fails, the others will still be available, making sure your domain remains accessible (avoiding the embarrassment that befell Microsoft in January 2001). They also make sure their servers have the bandwidth and network coverage to 'propagate' changes rapidly.

LooselyCoupled hosts its DNS with EasyDNS, which provides a top-quality DNS hosting service for $20 a year per domain, with complete self-service control over the domain using a web-based console. When we used EasyDNS to change the IP address for, it propagated the new address overnight, compared to around four days for a leading registrar we used recently. New subdomains (eg rarely take more than a few minutes to begin responding.

We haven't tested other DNS hosting providers, but the main alternatives to EasyDNS are UltraDNS, whose customers include MSN and Oracle, and, which offers a free service for up to 5 domains.

posted by Phil 6:59 AM (GMT) | comments | link

Building a website using plug-in online services: the Loosely Coupled experience

read an RSS feed from this weblog



Loosely Coupled weblog RSS source


Copyright © 2002-2006, Procullux Media Ltd. All Rights Reserved.