I disagree with the previous poster for the following reason. Just because a part is an operational replacement for another part does not mean that it programs the same way. A generic 8051 is actually a mask ROM part; you can't program it at all. As process technology changes so do the programming algorithms with respect to voltage, waveshaping, and timing.
If you need a programmer you should buy one. If you wan't to learn about how programmers are built then you should start with the manufacturer's programming specifications. Once you understand the programming specification you will be in an excellent position to evaluate any alternative that you find. In particular you may be able to identify critical shortcomings in a low cost programmer without going to the time and expense of constructing one only to find out that it has shortcomings.