Created
May 13, 2016 18:09
-
-
Save gjuric/bfd337957e36b978fd15a8b1c35f8861 to your computer and use it in GitHub Desktop.
IP adresa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once('vendor/autoload.php'); | |
use Symfony\Component\HttpFoundation\Request; | |
$request = Request::createFromGlobals(); | |
// Ako imaš proxy ispred, ovdje podesi njegov/njegove IP adrese | |
// $request->setTrustedProxies(['127.0.0.1']); | |
$ip = $request->getClientIp(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment