If you gather this information in any way from an applicant, you are opening yourself up to a lawsuit that will cost you many multiples of whatever you were hoping to save. Even if you win, which you won't.
Also, "and — if applicants ask — must give them a pay range for the job they are seeking"
So start offering what the job is worth.