Why use fprintf?

fprintf call error because url encoding string have "%".