Online veterinary pharmacies are quite poorly regulated in the United States. The result, predictably, is that some are reputable and some are shady.
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:
http://www.fda.gov/downloads/ForConsumers/ConsumerUpdates/ucm115432.pdf