icgit2 Posted January 14, 2018 Posted January 14, 2018 Hello everyone. Until December my site showed the IP of the client with the following PHP script: <? function getRealIP() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) return $_SERVER['HTTP_CLIENT_IP']; if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) return $_SERVER['HTTP_X_FORWARDED_FOR']; return $_SERVER['REMOTE_ADDR']; } ?> I have noticed that since January that script does not work anymore. What is the problem and how do I solve it? I appreciate your help. 1
Bailey Posted January 14, 2018 Posted January 14, 2018 Please remove your short tags and replace them with <?php
icgit2 Posted January 15, 2018 Author Posted January 15, 2018 Please remove your short tags and replace them with <?phpThanks for answering. I used "<? Php" instead of "<?" but it still does not work. Any other suggestions?
wolstech Posted January 15, 2018 Posted January 15, 2018 There's no space in the tag. The P needs to be right next to the ?
icgit2 Posted January 15, 2018 Author Posted January 15, 2018 There's no space in the tag. The P needs to be right next to the ? I wanted to say: "<?php" instead of "<?" But it still does not work
icgit2 Posted January 15, 2018 Author Posted January 15, 2018 Thank you all for your time. The problem was solved. I found that in another part of the source code it said "<?" instead of "<?php"
wolstech Posted January 15, 2018 Posted January 15, 2018 Glad you figured it out Let us know if you need anything else.
Bailey Posted January 15, 2018 Posted January 15, 2018 If you were wondering why this occurred, we recently removed the function for PHP short tags as they were causing errors on Tommy.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now