Sample code for 30+ languages & platforms
PHP Extension

Example: Http.GetRequestHeader method

Demonstrates the GetRequestHeader method.

Chilkat PHP Extension Downloads

PHP Extension
<?php

include("chilkat.php");

$success = false;

$http = new CkHttp();

$hdr1 = 'X-CSRF-Token';
$hdr2 = 'X-Example';

$http->SetRequestHeader($hdr1,'Fetch');
$http->SetRequestHeader($hdr2,'123ABC');

print $hdr1 . ': ' . $http->getRequestHeader($hdr1) . "\n";
print $hdr2 . ': ' . $http->getRequestHeader($hdr2) . "\n";

// Output:

// X-CSRF-Token: Fetch
// X-Example: 123ABC

?>