Multiphoton ionization of hydrogen and rare gases