Nik's Technology Blog

Travels through programming, networks, and computers

Request a web page using HTTP and a Telnet session

Ever wanted to be a real web geek?
Well, you can get one step closer by following these steps and browse a website using a Telnet session via the Windows(R) DOS terminal.
Believe it or not you can actually use this method to diagnose HTTP issues, and it also provides an insite into how the HyperText Tranfer Protocol (HTTP) works.

HTTP Request using Telnet

  1. Open a DOS prompt by clicking Start > Run and typing CMD and hitting Enter.
  2. Clear your screen of commands by typing CLS and pressing Enter.
  3. Start a Telnet session by typing telnet and pressing Enter.
  4. Configure the Telnet session to echo typed characters to the screen by typing set localecho.
  5. Instruct Telnet how you want to handle the Enter key by typing set crlf.
  6. Open up a connection to the site you want over HTTP port 80, by typing o nikmakris.com 80.
  7. Press Enter several times until the cursor lands on an empty line and then request a page from the site.
  8. Type the following carefully without making errors:

GET / HTTP/1.1
Host: nikmakris.com

  1. Then press Enter twice and you should receive the HTML response for the page you just requested from the web server, delivered to you by HTTP!

Here's what you should have typed, and the response from the DOS terminal and Telnet session. I've ommited the verbose HTML response from the web server.


Welcome to Microsoft Telnet Client

Escape Character is 'CTRL+]'

Microsoft Telnet> set localecho
Local echo on
Microsoft Telnet> set crlf
New line mode - Causes return key to send CR & LF
Microsoft Telnet> o nikmakris.com 80
Connecting To nikmakris.com...
GET / HTTP/1.1
Host: nikmakris.com

Adsense Allowed Sites Flags Up Google Cache Views As Unauthorised

When I read about the new Google Adsense feature "Allowed Sites" a couple of weeks ago, I thought I'd set it up on my account just to make sure no sites were displaying my Adsense code on their own sites, which could end up getting my account banned or flagged as suspicious due to factors outside my control.
Let's face it, if they're displaying my Adsense code, they've probably scraped or copied my site content without my consent, so who knows what else they may be up to!

Anyway I logged into Adsense recently and decided to check out the Allowed Sites page, and this is what I read...

There are unauthorized sites that have displayed ads using your AdSense publisher ID within the last week. Please click here to view them.

So I did click here, but all I got were some IP addresses:

 

Site URL
72.14.253.104
64.233.183.104
72.14.235.104
209.85.129.104
66.102.9.104
216.239.59.104
209.85.135.104
64.233.169.104
64.233.167.104

 

A little intrigued to what these IP addresses were, I decided to investigate further by issuing a trace route command to glean some more information.

C:\Documents and Settings\Nik>tracert 64.233.183.104

The trace route results resolved the IP addresses all to Google. I'm guessing that these are in my list because of people viewing my sites in Google's cached pages; So panic over!
Would be good if Google could filter out it's own IP addresses from the list though, so I don't have to check out each IP individually.

Worried about potential health effects of wireless networks? Six easy steps to setting up an alternative

You may have read the scare stories about wireless networks in the press recently, and you may be wondering what you can do to avoid the potential health effects and still have a home which is fairly wire-free.
You may also have recently been given a free wireless router from your ISP.
Sky broadband, AOL broadband, BT broadband, Pipex, they nearly all bundle a wireless router in with your broadband contract these days, so what do you do?

Upgrade to a Powerline Network

Whether you believe the scare stories or not. I'll show you how you can still keep your wireless router but without the potential side-effects.

The answer? Upgrade to a Powerline network. A lesser known technology that uses your mains electrical wiring to distribute your broadband connection, which will allow you to connect a computer anywhere you have a power socket, and turn off the wireless signals so you don't have to worry about "WiFi smog".

Six Steps to Avoid Using WiFi

  1. Purchase at least 2 Powerline wall-plugged adapters (Netgear, Devolo and Dlink all have Powerline products). This is enough to connect one computer to the Internet.
  2. Plug 1 adapter into a wall socket near the wireless router, and connect your existing router to the Powerline adapter using an Ethernet patch cable.
  3. Plug the other Powerline adapter into a wall socket near the computer you want to connect to the Internet and connect your computer to the second Powerline adapter using an Ethernet patch cable.
  4. You should now be online!
  5. Now you'll need to log-in to your wireless router console, usually via a web browser (see your router manual for details) and disable the wireless access point on the router. See the screen-shot below for a visual, obviously your router console may look completely different, but usually the instruction manuals are fairly good.
  6. You can now surf the web anywhere in your home wire-free and without using WiFi!

Still confused? Check out Devolo's Powerline flash presentation, which explains all about Powerline networking simply and with animation.

Google add feature to stem stolen Adsense publisher code

Google have added an "Allowed Sites" feature in the Adsense console to stem a problem that has been talked about for a while.
Lots publishers have had their site content stolen and re-purposed in an almost identical fashion on another domain, specifically to earn the criminal money from advertising without spending time and effort writing content themselves.
In some cases the HTML contained the victim's Adsense code, which when uploaded to a "junk" domain with other duplicate content, essentially associated the original publisher with a bad site in Google's eyes.
To protect Google's Adsense publishers from being associated with this crime and having their Adsense accounts potentially banned, Google has developed the "Allowed Sites" feature which allows the Adsense publisher to tell Google which domains it publishes to.

What this won't do is stop people stealing your content and code, nor will it stop people hacking into your web server and changing the Adsense account ID in the Adsense Javascript to the criminals Adsense ID, but this is definitely a step in the right direction.

Powerline Networking Now Fast Enough For Streaming HD Content

I've decided to give up waiting for the 802.11n standard to be ratified. When you spend hard earned cash on a piece of kit, you want to have some confidence that it will work in a year or so. Most of the high-end routers on sale today use a proprietary pre-802.11n or draft 802.11n, which may or may not be compatible with devices that meet the standard, when the IEEE pull their finger out.

What is Powerline networking?

Powerline networking has been around for sometime. Essentially it uses your electrical mains wiring as the media to send data over as if it were category 5 cable. You simply plug a box into the wall socket, which converts these signals that multiplex over the mains wiring to Ethernet. Typically you'd have one next to your router, which connects to your routers Ethernet socket, and the other in the room where your computer is located.

Advantages of Powerline over Wireless networking?

One of the main advantages of Powerline networking over Wi-Fi is that there are no dead spots where you can't get a good connection. As long as you are near a mains outlet, you can have a connection; Albeit with an Ethernet cable connected to the wall.

The latest batch of Powerline networking kits are sporting theoretical speeds of up to 200Mbps! Although in practice, overhead in the system, mains wiring and the 100Base-T outputs limit this maximum throughput; However, I have been getting speeds of over 100Mbps along my mains wiring, easily more than 802.11g, and more reliable too.

Installation does not require software drivers, it literally is a case of plugging them into the wall sockets, and connecting up the Ethernet cables and turning them on. This also means out-of-the-box Linux, Vista and OSX support! They'll also work with games machines and media extenders, or any other piece of kit that has an Ethernet port.

I purchased the Devolo HomePlug dLAN 200 AVDesk Starter Kit, which comes with two HomePlug adapters. They include Quality of Service for uninterrupted Internet TV and IP telephony circuitry, and they were given a "best buy" from PC Pro magazine.

There are other manufacturers who produce Powerline networking equipment, like Netgear's HD Powerline adapters, but after reading this review in PC Pro I decided to opt for the devices that conform to the Powerline AV standard.

Protect Your Identity on Social Networking Sites

Social networking sites are being used by criminals to steal peoples' identity. Once enough information has been gathered, credit cards and other services are set-up in the name of the person being targeted.
There are various sources on the Internet where thieves can collate information about a potential victim, such as the Land Registry information and the electoral register. However adding too much personal information to social networking sites like Facebook can facilitate thieves and make you an easy target.

So what can you do to minimise the possibility of online identity theft?

  • Make your Facebook profile only viewable by your friends.
  • Don't disclose your full date of birth, address and current employer, job title and other personal data.
  • Don't let Facebook allow search engines access to your page.
  • Use different passwords for each site and don't use easy to guess names like your pets name or 'password' 'abc' etc.
  • Don't add friend requests of people you don't know.
  • Install anti-spyware and anti-virus software on your computer, keep it up-to-date and scan your machine regularly.
  • Install an anti-phishing toolbar on your web browser, such as NetCraft and don't click on links in emails that purport to come from legitimate sources such as banks or other merchants like eBay. Instead type the URL into your web browser.

Book Review: Prioritising Web Usability

I can't recommend this book enough. A lot of the topics covered in this book are common sense. As a Web developer or designer you may think you create very usable sites already, but even if this is true, and you are a true usability guru, a lot of the facts and statistics in this book are useful for backing up your views, and getting your point across to clients who insist on functionality that you know full well will break usability conventions, and potentially harm their finished Web site.

The book is for people who have business goals for their Web sites or the Web sites they work on. This includes sites that match the following criteria:

  • E-commerce sites
  • Corporate sites
  • News sites
  • Non-profit organisations
  • Government agencies

If you are trying to get users' to accomplish something when they visit your site then you should be concerned about usability.

This book contains the results of many studies into how people behave on the Internet and consequently what makes Web sites succeed or fail.

This book alone is not enough to ensure your site will be the most usable it can be, but it is crammed full of tips and real world examples of what to do, and what not to do when it comes to designing Web user interfaces, writing Web copy and planning your Information Architecture. Ideally you will need to perform usability testing as well, but the information in this book will significantly help in improving your Web site.

The book begins by explaining how people use the Web and how to optimise your site accordingly. It explains how users' use search engines to find answers to problems, and how to improve your site to cash-in on these users.

Nielsen and Loranger then go back to the usability problems they found back in 1994 and discover what significant usability issues are still relevant today, including bugbears such as:

  • Breaking the back button
  • Pop-ups
  • Flash
  • Uncertain clickability
  • Plug-ins
  • Splash pages

The forth chapter helps you prioritise your Web site usability issues and decide what to tackle first. They do this by categorising usability problems by severity, frequency, impact and persistence.

Site search engines and their user interfaces and results pages (SERPS) are covered next, including a brief introduction to Search Engine Optimisation.

Chapters 6 and 7 concern navigation, information architecture, readability and legibility. This is followed by a chapter on how important it is to specifically write for the Web, using summaries for key points, and by using simple language. The importance of knowing your audience and how people skim read articles on the Web is talked about, as is the use of marketing slogans and hype.

The following chapter is geared towards your e-commerce goals. How to provide good product information and win consumer confidence in your site and product to increase and promote sales.

The penultimate chapter looks at presentation and users' expectations, while the final chapter in the book is all about balancing technology with people's needs. This covers the use of multimedia content such as videos and the use of familiar interface conventions in Web design.

Prioritizing Web Usability
By Jakob Nielsen and Hoa Loranger
Published by New Riders
ISBN 0-321-35031-6

 

Live Earth: How can we help reduce our carbon footprint?

After watching a few acts on Live Earth at the weekend I wondered how I could use this little space on the web to make a difference, and help reduce CO2 emissions. Then I remembered a PC Pro campaign launched in 2005 called "Switch IT off". Since then there have been lots of switch it off days to try and raise awareness.
Essentially these campaigns are set-up to encourage businesses and home users to switch-off their appliances instead of keeping them in standby when not in use.

PC Pro did a lot of research into office and home electronics. One particular phenomenon to which most non-IT people are unaware of is the fact that when you shut your PC down, it still carries on consuming electricity.
The ATX power supplies used in all modern desktop computers continue to supply the motherboard with a small amount of electricity to enable it to wake-on-LAN. Now the energy PCs use in this state is minimal, but it is still wasted energy nevertheless. The only way to completely shut a computer down is to turn it off at the mains, or flick the switch on the ATX power supply located at the back of the PC.

The general message of the Switch IT Off campaign is to get people into the habit of turning appliances off rather than using the standby option. Offices that get their staff to turn their PCs and monitors off every evening could save thousands of pounds a year in electricity bills and help reduce our CO2 emissions.

For more information read the full PC Pro Switch IT Off article...

Implementing UML 2.0 Use-Cases with Visio 2007

I've been busy creating some use-cases in Visio 2007 for an upcoming project and from what I can gather either Microsoft has not implemented the current UML 2.0 standard and stuck with an older version, or it decided what parts of the specification to implement.

Either way it's a little annoying, I'm having to spend extra time working out what was the equivalent diagram or notation in UML 1.2 was in order to draw it in Visio.

An example of this would be where you link two Use-Cases with the «include» relationship. This doesn't seem to exist in Visio, so it looks like you have to make do with the «uses» stereotype instead, which was replaced in the current standard.

A few other Visio bug-bears would be the sparse Use-Case documentation interface. It doesn't allow rich text, so adding more than a few lines of text could become very hard to read. Microsoft also seem to leave it up to the modeller to format their own use-case specification; but with such a poor interface I can't see how you could use table-orientated steps to make a sequence of events more readable.

Surely allowing attachments (in the form of Microsoft Word) to be added would make more sense?