473,378 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to fetch ip address of another computer?

17
Can anyone help me how to fetch IP address of another computer.
I have used this code:
$ipaddress = getenv($REMOTE_ADDR);
echo "Your IP address is : ".GetHostByName($ipaddress)." ";

Output i get is my IP address, I want to fetch IP address of other computers too. Any help will be great.

Regards

Zabi
Mar 2 '11 #1
3 2119
Niheel
2,460 Expert Mod 2GB
When using PHP and the environment variables you can only grab the IP Address of the client that is accessing your PHP file.

Hence that would be your computer.

By saving the IP addresses and the timestamps in a database, you can keep a log of what ip addresses accessed that page and at what time.
Mar 2 '11 #2
Zabivb
17
Thanks for your reply! Sample coding would be very useful for me.
Mar 2 '11 #3
dgreenhouse
250 Expert 100+
You can use this:
$ip = $_SERVER['REMOTE_ADDR'];
Mar 4 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Eric Caron | last post by:
Hi In my Windows service i want to write in eventlog of another computer. I see the MachineName property to set where to write log. I try this using IP address and this work great on a computer...
2
by: Selen | last post by:
I have a aspx file in my computer.I want to run it another computer in network. I write http://computername/filename but it doesnt work.Why can it be ? How can I solve the problem Thanks
1
by: Christoph Hilmes | last post by:
Hi NG, i have the following problem. I have developed a webservice-application as an asp.net-project. The ws-methods use methods from a classlibrary (dll) which i linked to the asp-project....
0
by: Stropher | last post by:
I just want to retrieve the users and groups of a given computer with the following: string machine = SystemInformation.ComputerName; ManagementObjectSearcher searcher = new...
2
friendjin
by: friendjin | last post by:
I have done a programming, and I want to release this programming and use it in another computer. I used batch build to realse, but it can only use in my computer. If I copy whole file to another...
3
by: =?Utf-8?B?c3Jpbml2YXM=?= | last post by:
Hi All, My ASP.net application has to fetch data from Excel sheet. I'm using HTML File Control to select an excel file. I'm using Microsoft.Jet.OLEDB.4.0 provider to fetch the data from excel....
0
by: hanthehead | last post by:
I would like to use the Standard Windows Dialog - "Select Computer" in my current .NET project. This would be exactly like the dialog that pops up in many windows applications for example when...
1
by: xsorimachi | last post by:
Hi, I have a computer A which I am logging in but i didn't logout until i go to another computer, computer B. How can I request session from computer A and call HttpSession to invalidate session of...
2
by: yashiro | last post by:
Hello everyone, I have a webserver with php. I would like to replace some files in an another computer, each time a php'page is running on my webserver. How can i realize this?How can i get an...
20
by: impin | last post by:
i created a page that stores all the information about the resume in to the database. i used php and mysql database. its runs on wamp server... it works fine in that system. now i want to access...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.