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 Quote
Bailey Posted January 14, 2018 Posted January 14, 2018 Please remove your short tags and replace them with <?php Quote
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? Quote
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 ? Quote
Luigi123 Posted January 15, 2018 Posted January 15, 2018 Moved to Website Management and Coding. Quote
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 Quote
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" Quote
wolstech Posted January 15, 2018 Posted January 15, 2018 Glad you figured it out Let us know if you need anything else. Quote
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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.