We have developed a technique to measure beta-delayed proton decay of proton-rich nuclei produced and separated with the MARS recoil spectrometer of Texas A&M University. The short-lived radioactive species are produced in-flight, separated, then slowed down (from about 40 MeV/u) and implanted in the middle of very thin Si detectors. The beam is pulsed and beta-p decay of the pure sources collected in beam is measured between beam pulses. Implantation avoids the problems with detector windows and allows us to measure protons with energies as low as 200 keV from nuclei with lifetimes of 100 ms or less. Using this technique, we have studied the isotopes 23Al and 31Cl, both important for understanding explosive H-burning in novae. They were produced in the reactions 24Mg(p,2n)23Al and 32S(p,2n)31Cl, respectively, in inverse kinematics, from stable beams at 48 and 40 MeV/u, respectively. We give details about the technique, its performances and the results for 23Al and 31Cl beta-p decay. The technique has shown a remarkable selectivity to beta-delayed charged-particle emission and would work even at radioactive beam rates of a few pps. The states populated are resonances for the radiative proton capture reactions 22Na(p,g)23Mg and 30P(p,g)31S, respectively.