@Abrar ******
you get the visa from a thai consulate in another country. The DTV cannot be gotten IN thailand
AND
most thai consulates that do issue visas via the eVisa online system have notices on their landing page that says you physically have to be IN that country to apply.
This is the notice on the London Thai Embassy website