The header() function sends a raw HTTP header to a client or browser or simply we can say it tells browser what type of content,it have to show. When a request sent from server to client/browser the HTTP informations has been sent to browser,The HTTP information may be small or large depends on the page…