Terrain's altitude on location

See this forum thread, which asked this same question: How do I obtain the height of the terrain through longitude and latitude?