Afghan security officials say Taliban militants have hanged five policeman in southern Afghanistan as a public warning to others .