If the Thai consulate in your country has switched to the evisa system, applying online is your only option.
I recommend you hurry. It can take anywhere from 2 days to 2+ weeks.
If your country doesn't use evisa, then you may already not have enough time.
****************************