Whoever, being a public servant, accepts or obtains or agrees to accept or attempts to obtain for himself, or for any other person, any valuable thing without consideration, or for a consideration which he knows to be inadequate, from any person whom he knows to have been or to be , or to be likely to be concerned in any proceeding or business transacted, or about to be transacted by such public servant, or having any connection with the official functions of himself or of any public servant to whom he is subordinate, or from any person whom he knows to be interested in or related to the person so concerned , shall be punishable with imprisonment for a term which shall be not les than six months but which may extend to five years and shall also be liable to fine.