{
    "href": "/post/2016/12/20/pecl-request-extension-beta-1-released/",
    "relId": "2016/12/20/pecl-request-extension-beta-1-released",
    "title": "PECL Request Extension: Beta 1 Released!",
    "author": "pmjones",
    "markup": "html",
    "tags": [
        {
            "href": "/tag/php/",
            "relId": "php",
            "title": "PHP",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        },
        {
            "href": "/tag/programming/",
            "relId": "programming",
            "title": "Programming",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        }
    ],
    "created": "2016-12-20 15:17:30 UTC",
    "updated": [
        "2016-12-20 15:17:30 UTC"
    ],
    "html": "<p>I am happy to announce that the PECL extension for <a href=\"https://pecl.php.net/package/request\">server-side request and response objects</a> has reached beta status! (<a href=\"https://gitlab.com/pmjones/ext-request\">Documentation here.</a>)</p>\n<p>This release adds four new read-only properties to the ServerRequest object:</p>\n<ul>\n<li>\n<p><code>$forwarded</code> is an array representation of <code>$_SERVER['HTTP_FORWARDED']</code> (cf. the <a href=\"https://tools.ietf.org/html/rfc7239\">Forwarded HTTP Extension</a>),</p>\n</li>\n<li>\n<p><code>$forwardedFor</code> is an array computed from treating <code>$_SERVER['HTTP_X_FORWARDED_FOR']</code>   as comma-separated values.</p>\n</li>\n<li>\n<p><code>$forwardedHost</code> is the <code>$_SERVER['HTTP_X_FORWARDED_HOST']</code> value, and</p>\n</li>\n<li>\n<p><code>$forwardedProto</code> is <code>$_SERVER['HTTP_X_FORWARDED_PROTO']</code> value.</p>\n</li>\n</ul>\n<p>If you use trusted proxies a lot in your work, you can use those values to compute the \"real\" client IP address in your application.</p>\n<p>This completes the intended initial functionality of the extension. You should install it and try it out, because it might be make your work easier.</p>\n<p class=\"reddit-links\">Read the Reddit discussion about this post <a href=\"https://www.reddit.com/r/PHP/comments/5jdtu5/pecl_request_now_computes_forwarded_values/\">here</a>.</p>\n"
}
