473,386 Members | 1,819 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,386 software developers and data experts.

IP Address

I'm new to this group on here, but I wanted to know if anyone knows how to
display an IP address using javascript. Thanks in advance.

Randy
Jul 23 '05 #1
4 2081
MRBEATZ wrote:
I'm new to this group on here, but I wanted to know if anyone knows how to
display an IP address using javascript. Thanks in advance.


No. JS has no way of determining the IP Address so it has no way to
display it, on its own.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #2
On Sat, 05 Mar 2005 22:33:27 -0500 Randy Webb wrote:
MRBEATZ wrote:
I'm new to this group on here, but I wanted to know if anyone knows how
to display an IP address using javascript. Thanks in advance.


No. JS has no way of determining the IP Address so it has no way to
display it, on its own.


http://javascript.internet.com/user-...p-address.html

Actually, it sneaks in a simple line of php coding to do it.
I have seen some total javascripts do the trick.
Question is will they actually detect the true IP of the visitor's machine
or not?
To better trap the IP would be best done server side with php.

Jul 23 '05 #3
Richard wrote:
On Sat, 05 Mar 2005 22:33:27 -0500 Randy Webb wrote:

MRBEATZ wrote:

I'm new to this group on here, but I wanted to know if anyone knows how
to display an IP address using javascript. Thanks in advance.
No. JS has no way of determining the IP Address so it has no way to
display it, on its own.

http://javascript.internet.com/user-...p-address.html


That site does not use JS to get the IP Address, only to display it. It
relies on server side scripting to attempt to get the IP Address. Before
attempting to correct me in the future, try actually reading (and
understanding) what I said. You do know though that they have a *reason*
for calling you RtS?
Actually, it sneaks in a simple line of php coding to do it.
Actually, its not PHP, but it is a server side scripting language.
PHP code does not start:
<!--#echo var="REMOTE_ADDR"-->

PHP tags either start with <? or <?PHP
I have seen some total javascripts do the trick.
No you haven't. But you are welcome to *attempt* to prove me wrong.
Question is will they actually detect the true IP of the visitor's machine
or not?
Doesn't matter since IP addresses are as worthless as the hairs on a
chicken's ass.
To better trap the IP would be best done server side with php.


And if a user does not have PHP available? Hmmmm

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #4
MRBEATZ wrote on 06 mrt 2005 in comp.lang.javascript:
I'm new to this group on here, but I wanted to know if anyone knows
how to display an IP address using javascript. Thanks in advance.


document.write("123.456.1.1");

Is it about displaying "an" IP or
about determining what your own IP is?

The server often sees another IP adres [router, proxi],
than your browser uses.

Serverside asp example using clientside javascript to display:

document.write("<%=request.servervariables("remote _addr")%>");

With pure clientside javascript it is impossible, I believe.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Alexander N. Spitzer | last post by:
If I have a machine with 3 virtual IP addresses (192.168.1.), how can I start 3 instances of the same RMI application (each started with different properties/configs), each listening on the port...
8
by: YAN | last post by:
Hi, I want to get the mac address from a machine, which i have the IP address of that machine, how can i do that? I know how to get the mac address of the local machine from the following code: ...
7
by: Privacy Advocate | last post by:
//crossposted to: comp.lang.javascript, alt.comp.lang.javascript in an effort to get factual answers from JavaScript experts// Simply put; Is it possible to obtain the real (actual) IP address of...
33
by: baumann.Pan | last post by:
hi all, i want to get the address of buf, which defined as char buf = "abcde"; so can call strsep(address of buf, pointer to token);
4
by: andreas.w.h.k. :-\) | last post by:
How do I change the address location in the wsdl <wsdl:port name="SearchSoap12" binding="tns:SearchSoap12"> <soap12:address location="http://searchservices/engine/search.asmx" /> </wsdl:port> ...
1
by: Phoenix_ver10 | last post by:
I have a mailing list with multiple names going to the same addresses. I need one address with all the names for that address on it. I checked out the example on microsoft's site, but A: It doesn't...
1
by: Jamie J. Begin | last post by:
I'm very new to the world of Python and am trying to wrap my head around it's OOP model. Much of my OOP experience comes from VB.Net, which is very different. Let's say I wanted to create an...
6
by: Nicolas Noakes | last post by:
Hello, I would like to convert to following process to code. Any advice is welcome. I have a hardware device which requires the this procedure to set it's IP address. First create an static...
36
by: Julienne Walker | last post by:
Ignoring implementation details and strictly following the C99 standard in terms of semantics, is there anything fundamentally flawed with describing the use of a (non-inline) function as an...
1
by: saravanatmm | last post by:
I need javascript code for validate the email address. Email address field cannot allowed the capital letters, special characters except '@' symbol. But can allowed the small letters, numeric...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.