Unfortunately, I have not played with garage door openers at all so I am not even sure how they transmit the code. The big problem you would run into is if you have one with the "rolling code" where the transmitted code changes each time you send it and it is created from a base code through some encryption algorithm (Keyloc is one name that comes to mind - I think Microchip makes that one). I would expect spending some time with Google searching on "garage door openers" would turn up a bunch of information on the subject including what encryption is used on the transmitted signal
hello again i found it this is that remote that i was talking about
On the "learning" rolling code remotes, you first open the door with the original remote, then hold the "clone" button (that little hole, using a paper clip) for 3 seconds, then press the button on the new one. It is the receiver that "learns" the code of the new one which is not the same as the old one; all are unique. So you have to be near the door to do it.
There's a few different garage remote control frequencies / communication protocols out there these days. Event the hard wired buttons have changed. Used to be that the buttons that you mounted on your wall were a simple switch and you could replace it with any sort of momentary contact switch. This was great since all you needed to do to install a button in your house was to run a wire pair to your house from either the garage door opener or from the other opener's switch to inside your house and then add a small pushbutton momentary contact switch inside your one of your existing electrical switches. The last garage door opener that I bought needs a switch that has a circuit board on it that sends a particular message back to the garage door opener. It's no longer just a case of whether the switch has been closed, but rather whether the switch sends the right message. Between the simple switch method and this method, the mechanism was that the switch had to have a particular resistance on it, so just shorting out the contacts on the switch would not do, it needed that particular resistance. That was easy enough to work around, so once the resistance value was determined, people did not need to buy a new switch from the manufacturer to add a second switch. Well, apparently the manufacturers did not like that they were losing potential sales from that -- can't have someone doing their own $1 switch when they could be spending $8-15 when they have to buy it from the manufacturer, right? So, the switches now have a circuit board inside of them and send some sort of message back to the garage door opener. This messaging protocol does give them the capability to do more than just open a single garage door though. With just the 2 wires, they can also use it to control additional garage doors, lights, or whatever.