Accessing BBC iPlayer from abroad:

(In text for now, will switch to HTML when I get a chance. Just wanted 
to write this up quickly)

Ok, I can tell you how to do this but first of all let me remind you 
that you need to pay a UK TV license for this to even have a chance of 
being legal. That said, many people who are UK TV license payers are 
abroad for a number of reasons, holiday, work trip, etc. If you are one 
of those people then this might help you. If not or perhaps even if you 
based on the UK (just not now) it is quite possible you will be breaking 
the law. Spend some time considering this before you continue. I am 
uncertain because laws are different in different countries and am not a 
lawyer in any country! I don't know if you will be breaking laws. My 
current guess is that this will be legal for some people, hence why I 
provide the instructions but I'll admit I could be wrong. You need to 
work the legality for yourself. If you want to know for certain ask a 
lawyer, otherwise don't follow these instructions. I accept no liability 
at all!

If you are satisfied that this is legal you also need to bear in mind 
that whilst I start out with the easy stuff, some of the following 
methods are relatively complex for the average computer user and I am 
only going to very briefly skim over these methods. If I was to explain 
every single step in detail then this small article would easily become 
a book. Also most of the key bits you need to know can be found on the 
internet with a little searching. Most people just need a few pointers 
of where to start. That is ALL this article is, nothing more.

Ok firstly consider how the BBC knows you are abroad. The key is your IP 
address. If you want to know more about Geolocation ustilising IP 
addresses there are plenty of articles on the web but it is not really 
necessary to know much for the purposes of this article. Suffice to say 
every computer on the internet has an IP address and these addresses 
give the BBC an idea of where you are located.

To get BBC iPlayer content from abroad you therefore need to have a UK 
IP address (or know someone who can help you that does have one [i.e. 
someone already in the UK]).

If you do know someone in the UK then you might find the easiest way to 
get around this is simply to ask that person to download the show you 
want to watch and find some way to send it to you. Some of the slightly 
more technical people reading this might be thinking, but content 
downloaded from iPlayer can't be copied from one machine to another 
because of DRM (Digital Rights Management). True ... but only of you use 
the BBC official downloader! There are others such as these:

http://po-ru.com/projects/iplayer-downloader/
http://fader.co.uk/post/iPlayer-Grabber-the-iPlayer-downloader-for-Mac-OS-X.aspx
http://linuxcentre.net/getiplayer/

(Note: This is by no means a complete list)

If you want to understand how those work, then read the following:

http://beebhack.wikia.com/wiki/IPhone_H.264_version

If this method isn't good for you because you don't want to be reliant 
on someone else to do the downloading, or because the person downloading 
for you doesn't have an easy way to send you the files (or indeed any 
other reason) then read on.

Ok, if you are not going to get someone else to download for you then 
you are going to need some form of UK Proxy server. Basically a proxy 
server handles a request on your behalf (a more complete explanation can 
be found by searching for Proxy server on Wikipedia or a similar site). 
A proxy server that is UK based will have a UK address, therefore if you 
connect via this it will appear to the BBC that you are UK based, as 
your request will appear to come from that server rather than your own 
machine.

With a bit of searching on your favourite search engine you can find 
free UK based proxy servers. However they tend to only be available for 
short periods of time due to the fact that people use them for things 
like iPlayer and this consumes a large amount of bandwidth, that the 
owner of the proxy server must pay for. Alternatively you can find 
providers that allow you to pay for access to a UK based proxy service. 
these are likely to be more reliable. Search around and read some 
reviews.

Once you have a UK proxy you will need to set it up so that your browser 
uses it to connect to the BBC website. I'm not going to explain how to 
do that here as there are many articles on the internet that do a better 
job of that than I could. As I hinted at above, this article is mainly 
to give you some pointers in the right direction and to consider some of 
the alternatives to standard proxy (paid or free).

Finally, you can create your own proxy service if you have access to a 
machine in the UK. Note, if it is your own machine you might consider 
installing proxy software (e.g. privoxy). Personally I would consider 
this overly complex (just to access iPlayer) and there are security 
implications, so I will skip over this option.

Your best option (in my opinion) is to connect to the machine via ssh. 
SSH stands for 'secure shell' and it is a method for accessing machines 
remotely in a secure fashion. Modern Macs, Linux and UNIX machines all 
allow ssh connections to be enabled easily. However, you need to have 
the Mac, Linux or UNIX machine directly connected to the internet with a 
Static IP address or domain name, and with a strong password for the 
login account. If this doesn't make any sense or is beyond you right 
now, you will either have to spend some time investigating on the 
internet (I'm not going to go into detail here) or skip doing on this on 
your own UK based PC. There are other options anyway. Any UK machine 
with ssh enabled that you have an account on and is publically 
accessable from the internet will do. This could be a technically minded 
friend or family member's computer that you have an account on, a UK 
based University/Work machine, UK VPS or regular hosting account (with 
shell access) or a UK shell account. The last three otions are services 
that can be bought (VPS hosting, a regular hosting account [with shell 
access] or a UK shell account). The UK shell account likely to be the 
cheapest. Again if you are paying for a service search around and look 
for reviews. Remember the most important bit for you is that you have 
shell access via ssh.

The easiest way to use your ssh is with Dynamic Port forwarding (a.k.a. 
SOCKS proxy emulation). I have written about this before for a different 
reason. However my old article still serves as a quick summary for how 
this works. You can find it here:

http://www.panix.com/~ruari/censorship.html

Note: That article lists Panix as a shell account provider, however they 
would not be useful for accessing iPlayer as they are U.S. based and 
hence have a U.S. IP address, rather than a U.K. one.

There are reasons that you might not want to use SOCKS proxy emulation 
to access iPlayer. Examples could be that your favoured browser does not 
support SOCKS (e.g. Opera), or that you might want to use one of the 
downloader programs listed at the start of this tutorial to download 
copies or your favourite shows for viewing later, rather than watching 
streamed in real time. In cases like these your ssh access to a UK 
machine give you other options.

You could just use regular port forwarding, i.e. from the machine you 
are on connect to the UK based machine as follows:

ssh -N -L 80:www.bbc.co.uk:80 [remote server]

(Note: On Windows use Putty as this provides port forwarding options 
over ssh, see my censorship link)

Next edit your hosts file ( http://en.wikipedia.org/wiki/Hosts_file ) 
and enter the following on a new line:

127.0.0.1 www.bbc.co.uk

Now start your browser (or downloader application) and use iPlayer 
normally. When you have finished, disconnect your remote ssh connection 
and change your hosts file back to how it was (or you won't be able to 
access www.bbc.co.uk).

If you use the iplayer-downloader (iplayer-dl) or programs based on it 
(e.g. iPlayer Grabber on the Mac) you customise it to avoid having to 
constantly switch your hosts file back and forth. Within iplayer-dl's 
installation there is a directory (folder) called lib/iplayer with files 
that can be edited. Change all 'www.bbc.co.uk' references in 
downloader.rb, metadata.rb and subtitles.rb to 'localhost:9999'. Then 
prior to running iplayer-dl, start up your ssh connection first as 
follows:

ssh -N -L 9999:www.bbc.co.uk:80 [remote server]

Where exactly these are located will vary depening on which (iplayer-dl 
based) program you use. I'll give you one example using iPlayer Grabber 
as I have looked into it. You will need to locate the files yourself on 
other variants of iplayer-dl.

On your Mac with 'iPlayer Grabber' installed navigate into the 
application bundle by right-clicking on the 'iPlayer Grabber.app' and 
choosing 'Show Package Contents', then navigate with the Finder through 
to the 'Contents/Resources/lib/iplayer' directory. (Alternatively with 
the command line you could do the following '$ cd /Applications/iPlayer\ 
Grabber.app/Contents/Resources/lib/iplayer' [assuming iPlayer Grabber is 
in the Applications folder].)

One final method for those with ssh access would be to get a copy of the 
original iplayer-dl script from po-ru.com (see above) and place it on 
the remote machine. You can then connect to this remote machine via ssh 
and then run the ruby script directly if you don't have root/admin 
access to install (use 'ruby -Ilib bin/iplayer-dl [Program ID or URL]'). 
Remember This must be run from the appropriate directory or the command 
must be altered accordingly. After the show has downloaded to the remote 
machine use a file transfer method (e.g. scp, sftp, ftp, http, etc.) 
to download to your local machine.

Ok, that is it. Hope it is of help to someone! ;)