For the UAE, just join the line for an immigration officer and receive a free 30-day visa on arrival which is cancelled when you depart. Just get another each time you visit. Clearly, this applies only to those entitled; many nationalities require an advance visa.
Similiar in Qatar but there is a charge of QAR100 (~$27). Pay the immigration officer by credit card as you receive the visa stamp.