Http component for Palmtree PHP
- PHP >= 5.6
Use composer to add the package to your dependencies:
composer require palmtree/csv
<?php
$user = new Palmtree\Http\RemoteUser();
$user->setTrustedIpHeaders(['HTTP_X_FORWARDED_FOR']); // optional for load balancers etc.
$user->getIpAddress();
$user->getUserAgent();