Remote control of drive gates

My friend has some automatic gates that open via a RF keyfob.

Would a RF transmitter attached to a Arduino be able to control the gates for simple opening?

How do I find what command is being transmitted by the Keyfob?

thanks for any thoughts
jasemilly