api header php

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

Also in PHP: