It's already been done! - so why reinvent the wheel?.
Try looking at the "Comgenius" remotes, these are programmed via a special serial lead from a computer.
If you really want to do it yourself?, you first have to decide on a scheme for reading and storing the remote codes, and then write a PIC program to read the stored data and transmit a replica of the original codes. You then need to get all the data files you require!.
A public forum is hardly the place to get any of this information, it's generally kept 'secret' as many companies make their livelihood from them! (such as One For All!).