Tens of millions of Americans have bought medications online without a prescription, according to a new study.