Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<meta name="keywords" content="http, header, cookie, magic cookie, internet explorer, netscape, opera, lynx, check, view, display, examine, inspect, see, proxy, client, server, browser, user agent, pocket PC, windows CE, digital TV, webtv, wap, wml, cc/pp, uaprof, capability, profile, preferences, content negotiation, metadata, dublin core, pics, platform for internet content selection, accessibility, WAI">
<meta name="description" content="Use this page to check the HTTP headers transmitted by your browser.">
<title>xhaus.com: HTTP header check</title>
<style type="text/css">
body {font-family:arial, sans-serif;}
table {border-width: 1px; border-color: black; border-style: solid;}
.head {background-color:#6666ff; color:#ffffff;font-size:12pt;}
.odd {background-color:#f0ffff; color:#000000; border: 1px solid black;}
<?php
// headers for proxy servers
$headers = [
"Accept" => "*/*",
"Connection" => "Keep-Alive",
"User-Agent" => sprintf("curl/%s", curl_version()["version"])
];
// open connection to Yahoo
/**
* Returns a stock by symbol (case-insensitively) else false if not found.
*/
function lookup($symbol)
{
// reject symbols that start with ^
if (preg_match("/^\^/", $symbol))
{
return false;
}