In a case wherein there is judgment or decree on behalf of the state for costs, there shall be taxed in the costs the charge actually incurred to give any notice, although it be more than 50¢ and mileage, and the fees of attorneys and other officers for services, and allowances for attendance, as if such fees and allowances were payable out of the treasury. What is so taxed for fees of, or allowance to, any person shall be collected, paid over and accounted for according to law.