| | Want to show the IP of the visitor to your site? All you have to do is add this code to your page where you want the IP to be shown: [br] CODE <?php[/br]echo "Your IP is $_SERVER["REMOTE_ADDR"]"; ?> |
| Nov 21, 2009 |
This is one choice!!
i usually use this for count my user and show ip. i got user more... if (getenv(HTTP_CLIENT_IP)) { // check ip from share internet $ip = getenv(HTTP_CLIENT_IP); } elseif (getenv(HTTP_X_FORWARDED_FOR)) { // ip is pass from proxy?? $ip = getenv(HTTP_X_FORWARDED_FOR); } else { $ip = getenv(REMOTE_ADDR); }
I Use this Code ::
< ? echo "Your IP is $REMOTE_ADDR"; ?> but It Show Me Last IP and Not Today IP what is problem >?
What do you mean Last IP? Go to the page where that code it, and then go into dos and type in ipconfig
it the ip's match, then it is working ok... if you nitice there is a space between the < and the ?, take taht out, so it should look like <? try that...
i tried it and it doesn't work for me either, i get this error:
Notice: Undefined variable: REMOTE_ADDR in c:\program files\easyphp1-7\www\index.php on line 10 Code i used is: <p><?php echo "Your IP is $REMOTE_ADDR"; ?></p> the page is located here: http://82.43.57.227/index.php (this is my home pc/server btw, its not always up lol... sorry if its down)
Are all the features og PHP turned on, on your server?
not sure lol, does this help: http://82.43.57.227/uwd/index.php?page=phpinfo
i tried this code instead: echo "User's IP address: " . $_SERVER["REMOTE_ADDR"]; that seems to have worked...
If global vars are turned on, use $REMOTE_ADDR, else, use $_SERVER["REMOTE_ADDR"].
Use <? already script for you. -reply by Anonymous Keywords:
Similar Topics
Keywords : show, visitors, ip, addresss
With PHP (no MySQL is needed) (9) Another script, which shows the visitors onlineat the moment in your site. This script was not made With PHP (no MySQL needed!) (4) Well, here we will make an hit counterusing php and an *.txt file. This script is so simple, but record your visitors... (3) All you do is copy this code into the page you want to display it on. CODE $counterfile = Looking for show, visitors, ip, addresss
|
![]() Show Visitors Ip Addresss |
Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com