| | 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: CODE <?php echo "Your IP is $_SERVER["REMOTE_ADDR"]"; ?> |
|
|
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...
Recent Queries:-
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... (1) All you do is copy this code into the page you want to display it on. CODE <?php Looking for show, visitors, ip, addresss
|
|
![]() Show Visitors Ip Addresss |
| ADD REPLY / Got an Opinion! | a humble request :-) | RAPID SEARCH! | Free Hosting | [X] |
|
Express your Opinions, Thoughts or Contribute your information that might help someone here. Ask your Doubts & Queries to get answers.. "Together, We enlight each other!" |
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP. | 500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE |
|