A hacker has been jailed for almost five years for creating a zombie network of hundreds of thousands of computers.