When any officer or five or more reputable citizens of any county shall file a petition with any mayor or justice of the peace of any county stating that they have reason to believe, and do believe, that a certain person or persons have knowledge touching a violation of the criminal law against the sale, barter, or possession of intoxicating liquors, or the unlawful keeping of the same, and who shall deposit sufficient money to cover the estimated cost of the proceedings or give bond to secure the same, such mayor or justice of the peace shall forthwith issue a subpoena returnable instanter, or on a day certain not later than five days, for such witnesses as may be named in said petition to appear before him at the time and place specified to answer all questions which may be propounded to him. If any witness who has been summoned shall fail to appear and testify, the mayor or justice of the peace may issue an attachment returnable before him at such time and place as he may designate, and said mayor or justice of the peace shall have full power to fine and imprison for contempt any witness failing to appear or refusing to testify, as well as for any other contempt.