Will the US government recognize my foreign marriage?
Generally, any marriage entered into between two U.S. citizens in another country is recognized as valid in the U.S. as long as the union was legal when and where performed. This means that as long as any issues that would invalidate the marriage at home (underage, incapacity, bigamy, blood relatives, etc.)
Can you get married while in different countries?
As long as you meet the requirements for the country you get married in, the US (and other countries) will recognize the marriage as legal.
Can I get married in the US and leave?
If You Want to Simply Get Married and Then Return Home Legally, there is nothing wrong with getting married while you are in the U.S. as a visitor (on a B-2 visa), if you return home at the end of your permitted stay.