View Full Version : Show user IP
this used to work on my site but strangely it doesnt work anymore
i have a stats menu where it shows some stats including your IP i am using this code but it wont work anymore:
<!--#echo var="REMOTE_ADDR " -->
anybody know whats going on?
iRoss
17-05-2005, 02:13 PM
<? echo "IP: $REMOTE_ADDR"; ?>
:)
That never worked... :s
is it ment to be:
<? #echo "IP: $REMOTE_ADDR"; ?>
splintercell!
17-05-2005, 03:19 PM
That never worked... :s
is it ment to be:
<? #echo "IP: $REMOTE_ADDR"; ?>
Try <? #echo "IP: $ip = $_SERVER['REMOTE_ADDR']"; ?>
:Blob
17-05-2005, 03:20 PM
<!--#echo var="REMOTE_ADDR" -->
Its either that or your hosting dont allow it..
iRoss
17-05-2005, 03:22 PM
i can't see why it didn't work, Thats the usual 1, right?
:Blob
17-05-2005, 03:29 PM
i can't see why it didn't work, Thats the usual 1, right?
Mines the oriiginal, to get code on CPanel go to errors page and make the code of show users IP?
the usual one i use was my original one it worked for ages then one day i edited the page and it never worked again.
None of them worked :eusa_doh:
Edited by Kroziun (Forum Moderator): Please don’t double post, simply edit your previous post.
iRoss
17-05-2005, 04:39 PM
Lol fixed now ;)
Mentor
17-05-2005, 04:44 PM
<!--#echo var="REMOTE_ADDR " -->
is using SSI, this usealy only works on pages with the shtml exsention.
<? #echo "IP: $ip = $_SERVER['REMOTE_ADDR']"; ?>
is php, an only works on php pages, athogh wouldnt work as # woul convernt the rest of the line in to a comment "/
will any of them workon FrontPage?
:Blob
17-05-2005, 04:48 PM
will any of them workon FrontPage?
If you save your file as PHP or shtml, yes
Anderman
17-05-2005, 05:17 PM
Yes and your server will need to support PHP i think
:Blob
17-05-2005, 05:18 PM
Yes and your server will need to support PHP i think
Yes
If you save it as PHP, make sure your host supports PHP
BlueTails
17-05-2005, 05:19 PM
LOl ;D Nice Scritts
Mentor
17-05-2005, 05:28 PM
You aslo need your sever to support ssi to use that, athogh most do "/
BlueTails
17-05-2005, 05:46 PM
Most Paid Do, Free Hardly Ever
splintercell!
17-05-2005, 05:57 PM
to use the <!-- one save the page as .shtml :)
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.