?
Solved

Internal IP

Posted on 2005-04-26
5
Medium Priority
?
275 Views
Last Modified: 2008-02-26
Hi All:

Refference: http://www.auditmypc.com/whats-my-ip.asp

I know this is an ASP page, and it states it is done in Java, but is it possible to capture the users "INTERNAL" IP address if it is found ?

Thanks in advance !
0
Comment
Question by:SR301
  • 3
5 Comments
 
LVL 33

Accepted Solution

by:
sajuks earned 100 total points
ID: 13864975
echo $_SERVER['REMOTE_ADDR'];
should get what you want, upload it on ur php server and check from some other machine...not the server itself.

u could also check http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=539&lngWId=8
and
when you can't resolve the client's IP due to a proxy server
 credit to leeprovoost for this
<?php
   if ($_SERVER["HTTP_X_FORWARDED_FOR"] != ""){
       $IP = $_SERVER["HTTP_X_FORWARDED_FOR"];
       $proxy = $_SERVER["REMOTE_ADDR"];
       $host = @gethostbyaddr($_SERVER["HTTP_X_FORWARDED_FOR"]);
   }else{
       $IP = $_SERVER["REMOTE_ADDR"];
       $host = @gethostbyaddr($_SERVER["REMOTE_ADDR"]);
   }
?>
0
 

Author Comment

by:SR301
ID: 13865060
That will continue to return the IP Address of your modem, and not beyond your router/firewall... I'm interested in the Internal IP !
0
 

Author Comment

by:SR301
ID: 13865219
0
 
LVL 6

Expert Comment

by:German_Rumm
ID: 13866139
It's not possible to get internal ip using PHP. After all, it's on the other side :-)
auditmypc.com does it with Java (which is on the client's machine, so it may know it's internal ip) sending information to server.
0
 

Author Comment

by:SR301
ID: 13866425
OK - Was hoping for a PHP version... I guess its something I need to ask in the Java section then hey ?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This article discusses how to implement server side field validation and display customized error messages to the client.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses
Course of the Month16 days, 19 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question