content type php header

PHP
<html>
<?php
/* This will give an error. Note the output
 * above, which is before the header() call */
header('Location: http://www.example.com/');
exit;
?>

header ( string $header [, bool $replace = TRUE [, int $http_response_code ]] ) : void<?php
// This will redirect  to google.com
$url = "https://google.com";
header("Location: $url");  
?>
Source

Also in PHP: