Rusty Spigot.

The computer science source

Accessibility theme for WordPress

I had a look through the WordPress theme directory and was surprised to see no themes designed with accessibiliy for low vision readers in mind. So using the Sandbox theme and the BBC’s own Betsie Low Vision Parser (a great Perl script to make your website low vision freidnly) I quickly made my own, here is a screenshot:

Screenshot

AccScreenshot

Download

Download theme

The old location for the accessibility theme was here

Python-urllib/2.5 bot from google labs

Anyone else seeing the Python-urllib/2.5 google labs bot hitting their sites? Ive noticed it particularly hits new sites.

Just wondering if anyone out there has any idea what is does? Post a comment if you’re seeing it too and maybe we can work it out.

How to use net use

I've noticed quite a few people have been searching for how to use the net use command on this site.
Below is a list of the commands, and a full tutorial on how to use net use is here 
The NET Command Program
 NET Command Syntax Chart
 

NET ASCII

NET BOOT

NET CLOSE

NET CLIENTS

NET COMBINE

NET CONTINUE

NET DEBUG

NET DELAY

NET GHOST

NET FLUSH

NET HELP

NET KEY

NET LOAD

NET LOGOFF

NET LOGON

NET MENU

NET MODEM

NET PAUSE

NET PASSWORD

NET PEERS

NET PING

NET PORTS

NET PRINT

NET PRNSETUP

NET RC / Remote Control

NET RECEIVE

NET RING

NET SEND

NET SEPARATE

NET SERVERS

NET SHARE

NET TIME / DATE

NET USE / CONNECT

NET VERSION

NET VIEW

Which is the best web hosting company?

There isnt a simple answer to the question, “Which is the best web hosting company?”, as the answer depends entirely on your needs. To be honest, I’ve always gone for the cheapest. Sometimes I’ve been pleasently surprised, sometimes its led to major issues.

Below are three short tales from the crypt of problems I’ve had with webhosts:

  • The ISP HostMy first serious website was hosted on the subdomain of a free ISP I used about tenyears ago. For the price, the hosting was fantastic. It was reliable, fast and the support was excellent. However, about a year ago the company went bankrupt and down went my website. As the site was hosted on a subdomain (ie it was name.isp.com rather than name.com), the site went down and there was nothing I could do. The moral here is if you’re making a serious website, buy a domain name.
  • The trapping webhostAnother problem I had early on was when I hosted a website with 10quid. The dealwas great for a small website: for 10 pounds you get a domain name and basic hosting. The problem was, the hosting was limited to about 1mb. Once the website started to expand, I needed to upgrade the hosting space but found the next level of hosting was ten times as expensive! Note: 10quid have since improved their basic hosting deal.
    A related problem are hosts that register domains under their name, not yours. This can make transferring domains troublesome.Right, so thats my advice on avoiding particular problems. Now here are some things you may wish to consider:
  • Price – My advice here is not to pay for more than you need, but make sure thatupgrading is possible and affordable.
  • Location – Getting a host from your own country can increase your search enginerankings for users in your own country. On the balance, you may be targetting internationalusers, and may wish to make use of the cheap dollar (if you’re outside the us). Also, support is considerably easier in a country that speaks your language, than trying to use google to translate between Thai and English every time you have a problem.
  • Bad neighbourhoods – Before you sign up for a host use a site like MyIpNeighbours tosee whoelse is hosted with them. If all you see is spam sites, then search engines may thinkyour site is spam too.
  • Scripting and Apps support – If you are an experienced web designer you’ll no doubtneed atleast PHP and MySQL. If you are less experienced the EasyApps collection inCpanel can be a useful way of easily setting up content management systems.
  • Bandwidth and Space Make a generous estimate for how much bandwidth and harddrive space you will need. Say 500 pages at 100kb will require ~50mb. Say 1000 visitors/dayeach viewing 2 pages will need ~ 6GB/month. If you’re hosting large images or videos expect considerably more. Again my advice is to not get too optimistic and pay for more than you will need, but make sure you can upgrade at a reasonable cost.Hosts I recommend
    The following hosts I’ve tried and reccomend. Hosts with a * I get a commision from if you do sign up- but I haven’t reccomended anything I’ve tried and liked.
  • Worria.com -The host this site is on. A little slow, not that that reliable (ie uptime can be an issue) but very affordable
  • BlueHost* – A very reliable host, plans starting at $7/month
  • iPowerWeb Hosting* – $7.95/Mo., 1500 GB of Space, 15000 GB of Transfer, 2500 Emails (domain name included). Good reliability

  • Do you want a dial up or broadband?

    Dial up works by connecting through your phone line. It is the cheapest method to connect to the internet. It is also however the slowest (in terms of downloads and time waiting to connect), and prevents you from being able to receive phone calls whilst connected.
    Broadband is typically more than ten times faster, allowing you to stream videos and browse websites comfortably.

    If you choose broadband, you’ll need to choose between DSL and cable connections. Typically cable is the faster than DSL, but may not be available in your area. Satellite is fast and widely available; but can be very expensive.

    Once you’ve decided the service you want, try asking your existing telephone provider if they offer any good deals. Also try looking at comparison websites, and try my recomended ISP’s below.

    When choosing a provider, consider more than just the cost. In particular, look for a toll free support number (as set up problems are very common). Also check if there are installation costs.

    The actual implementation of an ISP can affect the speed significantly. Whilst two cmopanies may both offer the same bandwidth, one company (typically larger companies) may have agreements with other ISP’s to have priority traffic. This can lead to discrepencies between companies speeds. It all gets a bit confusing at this point but it isnt too important :)

    6.0MB of Broadband…7Xs Faster Than DSL…Order Now from Comcast

    Get Free NetZero Internet Access for 10 hours per month

    How to write secure PHP scripts

  • Chmod your files to 755, not 777
    If your scripts are set to 777 (you can set and view permissions with your
    favourite ftp client) then the user nobody, ie people on your site, can
    potentially edit and execute files. Chmod’ing all your scripts to 755 will
    prevent this.
  • Read files, don’t include them
    If you are importing user content from flat files, dont use include as it will
    execute php instructions. Instead read the files.
  • Global variables
    Enabling register_global variables in php.ini makes coding easier, as you
    don’t need to declare varibles to be able to accept them from user input.
    Howevr, this leaves your code open to attacks (Eg setting password_ok=1) unless
    you are very careful.
  • exec() and system()
    If you pass user data to exec or system they can execute shell commands, for
    example to delete all your files. You may also wish to disable such functions
    in php.ini with

    disable_functions = system,exec

  • SQL Injections
    Attackers may attempt to inject data into your sql tables, for examples
    overwriting the administrator password. To prevent this parse user input, with
    functions such as addslashes()
  • display_errors in php.ini
    If you display php errors to users you may be giving out confidential
    information
  • Will google push prices up?

    I read an interesting article in the Belfast Telegraph today (“Get a life, or just Google it”) about Google’s plan to store all data it gains from users permanently to offer more relevant websites and product advertisments. Ignoring the obvious privacy concerns, there may be another issue with this- expanding Google’s price comparison services (eg Froogle) may be pushing the prices that consumers pay up, not down.

    “For example if you want to buy a particular book from a certain site, Google could locate other sites selling the same book at a cheaper price or it could recommend other books by the same author.” The Telegraph

    The reason is that competitors know exactly what price they have to beat, all it takes is a quick search. Without this, they only have a vague idea and will often offer very low prices in case a competitor can beat them. Paul Klemperer, the UK governments auction theorist, states this more formally:

    Transparent internet prices are readily observable by a firm’s competitors so lead, in effect, to an “ascending” auction; a firm knows if and when its others are being beaten and can rapidly respond to its competitors’ others if it wishes. So, viewing each car sale as a separate auction, the price any consumer faces falls until all but one firm quits bidding to sell to him. …
    On the other hand, shopping to buy a car from one of competing dealers is very like procuring in a (first-price) “sealed-bid” auction. It is typically impossible to credibly communicate one dealer’s other to another. (Car dealers often deliberately make this hard by refusing to put an other in writing.) So from the buyer’s perspective it is as if sellers were independently making sealed-bid others in ignorance of the competition. …
    “Why Every Economist Should Learn Some Auction Theory”, Paul Klemperer

    Other concerns are that the only companies that can offer very low prices across the board are large firms, as they buy in such bulk and have low cost per transaction due to their size. Again, Google’s price comparison service can be a disadvantage to small firms.

    To end on a more positive note, I am just highlighting some issues I forsee that may come to be important in the future. At present it is clear that the Internet as a who has enabled small companies to reduce their selling costs, sell to a wider audience and also allow consumers to easily compare and, in general, buy products at prices far lower than the high street.

    Fun with google code search

    Google has just released their newest toy from the labs: Google Code Search. Along with being a useful tool for development, and perhaps finding security holes, you can also have alot of fun with it.
    In case you were wondering, there are:

    Just 100 hits for the phrase hitler. Including my favourite:

    "One World, one Web, one Program." - Microsoft(R) promotional ad
    "Ein Volk, ein Reich, ein Fuhrer." - Adolf Hitler
    	
  • An impressive 2000 hits for Homer Simpson
  • "   14:    my $storage = Springfield::connect_empty;
    my $homer = NaturalPerson->new( firstName => ‘Homer‘, name => ‘Simpson‘ );
    
    Springfield::test( !defined $storage->id( $homer ) ) “
    	
  • And a dissapointing 6 hits for Oompa Loompa
  • "addPlayChat("4 Oompa Loompa“,”Oompa Loompa Doopida Dee”, oompa);”

    Hunting for interesting quotes is getting to be quite an addiction for me. I am currently investigating the number of pieces of code written by “Your Mum”.

    Also of interest is the Linux Kernelswear count project.

    On the fly translate with .htaccess

    A neat trick I saw on corz.org is that you can do on the fly translation using .htacces and Google or Altavista translate.

    By re-writing anything ending in -fr, for example, to the url of the french google translator. For example, the .htaccess will translate on the fly:

    Options +FollowSymlinks
    RewriteEngine on
    RewriteRule ^(.*)-fr$ http://www.google.com/translate_c?hl=fr&sl=en&u=http://www.rustyspigot.com/$1 [r,nc]
    RewriteRule ^(.*)-de$ http://www.google.com/translate_c?hl=de&sl=en&u=http://www.rustyspigot.com/$1 [r,nc]
    RewriteRule ^(.*)-es$ http://www.google.com/translate_c?hl=es&sl=en&u=http://www.rustyspigot.com/$1 [r,nc]
    RewriteRule ^(.*)-it$ http://www.google.com/translate_c?hl=it&sl=en&u=http://www.rustyspigot.com/$1 [r,nc]
    RewriteRule ^(.*)-pt$ http://www.google.com/translate_c?hl=pt&sl=en&u=http://www.rustyspigot.com/$1 [r,nc]

    Wikipedia make all external links no-follow

    In a  move that was a long time coming, Wikipedia has decided to attatch rel=nofollow to all outgoing links. This small change will mean that all links from Wikipedia will be ignored by Google (and Msn, Yahoo) when weighting how important sites are.

    This will have too affects. The first is that spamming of Wikipedia will reduce dramatically, freeing up editors to spend their time increasing the quality of existing pages rather than removing spam.

    The second is that some existing sites that rely heavily on honest Wikipedia articles for page rank will drop dramatically in the rankings.