For a holomorphic self-map phi of the unit disk of the complex plane, the compactness of the composition operator C-phi(f) = f circle phi on the Hardy spaces is known to be equivalent to the various function theoretic conditions on phi, such as Shapiro's Nevanlinna counting function condition, MacCluer's Carleson measure condition, Sarason condition and Yanagihara-Nakamura condition, etc. A direct function-theoretic proof of Shapiro's condition and Sarason's condition was recently given by Cima and Matheson. We give another direct function-theoretic proof of the equivalence of these conditions by use of Stanton's integral formula.