Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Client stuck at 76% / Voting API too many re-directs [HelpRequest]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="MayoMayn" data-source="post: 397110" data-attributes="member: 71840"><p>[PHP]</p><p> public function getIP()</p><p> {</p><p> $ip = $_SERVER['REMOTE_ADDR'];</p><p> // In case the server is using CloudFlare, `REMOTE_ADDR` receives the server's IP itself and not the user's. `HTTP_CF_CONNECTING_IP` is deprecated and full of exploits.</p><p> if(isset($_SERVER['HTTP_FORWARDED'])) {</p><p> $ip = $_SERVER['HTTP_FORWARDED'];</p><p> } elseif(isset($_SERVER['HTTP_X_FORWARDED'])) {</p><p> $ip = $_SERVER['HTTP_X_FORWARDED'];</p><p> }</p><p> return $ip;</p><p> }</p><p>[/PHP]</p><p>Magical fix, if you bothered to read or understand coding.</p></blockquote><p></p>
[QUOTE="MayoMayn, post: 397110, member: 71840"] [PHP] public function getIP() { $ip = $_SERVER['REMOTE_ADDR']; // In case the server is using CloudFlare, `REMOTE_ADDR` receives the server's IP itself and not the user's. `HTTP_CF_CONNECTING_IP` is deprecated and full of exploits. if(isset($_SERVER['HTTP_FORWARDED'])) { $ip = $_SERVER['HTTP_FORWARDED']; } elseif(isset($_SERVER['HTTP_X_FORWARDED'])) { $ip = $_SERVER['HTTP_X_FORWARDED']; } return $ip; } [/PHP] Magical fix, if you bothered to read or understand coding. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Client stuck at 76% / Voting API too many re-directs [HelpRequest]
Top