You can buy or exchange money online if your home country bank allows you to. In general, when you buy or exchange currency online, someone is required to send or deliver the physical currency bills to you. In other cases, some banks may issue a traveler check which can be used in the USA to withdraw cash from a physical bank location. American Express is the leading issuer of traveler checks. They are as good as cash and should be protected at all times.