Search
 
SCRIPT & CODE EXAMPLE
 

PHP

pht get header from request

<?php
function getRequestHeaders() {
    $headers = array();
    foreach($_SERVER as $key => $value) {
        if (substr($key, 0, 5) <> 'HTTP_') {
            continue;
        }
        $header = str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))));
        $headers[$header] = $value;
    }
    return $headers;
}

$headers = getRequestHeaders();

foreach ($headers as $header => $value) {
    echo "$header: $value <br />
";
}
Comment

PREVIOUS NEXT
Code Example
Php :: laravel import csv 
Php :: How to add watermark in FPDF PHP - Parte 1 
Php :: $order- date 
Php :: contact us page mail prestashop 
Php :: if is gutenberg page php wp 
Php :: controller run 
Php :: php docblock 
Php :: php store html in varible 
Php :: hou to fill value in input box using php 
Php :: php send response without quitting 
Php :: php code inside html 
Php :: how to execute a php script from the command line? 
Php :: auto complete order paid 
Php :: model all 
Php :: Removing the additional information tab using PHP code snippet 
Php :: @parent, @include, @show blade in laravel 
Php :: html vs php 
Php :: traduction website 
Php :: how to get count of rows in a table in laravel query 
Php :: symfont request all 
Php :: php check if variable is true or false 
Php :: how to generate unique alphanumeric 6 digit code through php myadmin 
Php :: larevel binance api 
Php :: how to rrestart brew php 
Php :: function to find total number of students in wplms 
Php :: use htaccess to redirect in cpanel lsrsvel 
Php :: : in php 
Php :: pcntl php 
Php :: codecept run single test 
Php :: run php after product added 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =