The Food and Drug Administration recently published a fact sheet (link is PDF) advising consumers to exercise caution when buying medications such as heartworm preventatives online. From the fact sheet:
FDA has found companies that sell unapproved pet drugs and counterfeit pet products, make fraudulent claims, dispense prescription drugs without requiring a prescription, and sell expired drugs.
I recommend that you read the entire fact sheet for more information on how to sort out good internet pharmacies from bad ones. Read it here: