Register  |  Login




Advertisement

Start Your Own Q&A Site

Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.

Question

Status: Open Points: 75 Time: 00:36 - Jul 03, 2011  

getsumdare

Find IP Address,DNS Server,or Find the location of a computer

Hello All,
Very Good mong
i want to find IP Address,DNS Server,or Find the location of a computer.
in PHP..

Abdul
+91 9999 38 5884
getsumdare@gmail.com

Categories

Answer Discussion
Tutorials

 

rikustrife91

Date:: Jul 04, 2011

Time:: 02:24

Depending on your System here are the following results:
Windows 2000, XP:
Start/Run:
Enter in the command: cmd
At the command prompt enter in: ipconfig

Vista, WIndows 7:
Go to the command prompt by select the Windows logo and in the search box entering:
cmd
From the command prompt enter in the command: ipconfig

On Windows XP, Vista, Windows 7, if you'd like to know your MAC address (physical hardware address of a your network card), at the command prompt you can enter the following command:
getmac -v

On Mac OS X:
1. Click on the Mac logo on the top left of the screen.
2. Open System Preferences
3. Under Internet and Network, click 'Network'
4. Select which adapter, such as AirPort or Ethernet.
5. Select TCP/IP and you'll see your IP address.. If you receive a dynamic IP address from your internet provider, it will likely be different on your next session. So if you need your IP address for later use, please check when you log on for that session.

The code for it in PHP is the following:
function getRealIpAddr()
{
if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
$ip=$_SERVER['REMOTE_ADDR'];
}
return $ip;
}

Hope this helps :)

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

Tutorials cannot be submitted until the Answer Discussion is complete.

Submit answers in the Answer Discussion area

Ask a Question

Have a new question? Ask!

You have 100 characters to use



Top Experts

View More

Rank

Expert

Points

1.

nidhi

10354

2.

oracleofDelphi

6493

3.

rcastagna

5596

4.

LAGM

4848

5.

PeterNZ

3487

6.

gonzalo

2840

7.

Mason

2770

8.

jgivoni

2303

9.

xarcus

1820

10.

Anpanman

917

Become an Expert

Register today to share your knowledge with the community and be recognized and rewarded for your contributions.


Register Here




"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it



Language Options

English:

www.quomon.com

Español:

www.quomon.es