PECL Request Extension: Beta 1 Released!
I am happy to announce that the PECL extension for server-side request and response objects has reached beta status! (Documentation here.)
This release adds four new read-only properties to the ServerRequest object:
$forwardedis an array representation of
$_SERVER['HTTP_FORWARDED'](cf. the Forwarded HTTP Extension),
$forwardedForis an array computed from treating
$_SERVER['HTTP_X_FORWARDED_FOR']as comma-separated values.
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.
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.
Read the Reddit discussion about this post here.