All fines imposed and recovered for any violation of this article shall be paid to the county treasurer and credited by him to the school fund of the county in which the violation occurs.