Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Client IP Address

Hello everyone,

I want my webpage to find and display the client's IP address for them. Is there a way to use non-cgi, non-asp programming to do this? Is there an HTML or JavaScript way, that would work for IE and Netscape?

Thanks for your help.


Comments

  • : Hello everyone,
    :
    : I want my webpage to find and display the client's IP address for them. Is there a way to use non-cgi, non-asp programming to do this? Is there an HTML or JavaScript way, that would work for IE and Netscape?
    :
    : Thanks for your help.
    :

    With JavaScript you can only get the IP from NetScape, cause IE has a little bit better protection (with cgi you can still get it). Anyway, here's the netscape way:


    localipinfo=java.net.InetAddress.getLocalHost();
    ip=localipinfo.getHostAddress();

    document.write("Your IP address is " +ip+ "
    ");


    The problem is dat IE doesn't know the java object.


  • : : Hello everyone,
    : :
    : : I want my webpage to find and display the client's IP address for them. Is there a way to use non-cgi, non-asp programming to do this? Is there an HTML or JavaScript way, that would work for IE and Netscape?
    : :
    : : Thanks for your help.
    : :
    :
    : With JavaScript you can only get the IP from NetScape, cause IE has a little bit better protection (with cgi you can still get it). Anyway, here's the netscape way:
    :
    :
    : localipinfo=java.net.InetAddress.getLocalHost();
    : ip=localipinfo.getHostAddress();
    :
    : document.write("Your IP address is " +ip+ "");
    :
    :
    : The problem is dat IE doesn't know the java object.

    i supose the code is good ....
    but why don't you want it in cgi ?
    almost all freeservers bravenet etc have a cgi bin .
    and a paid server must actually have a cgi otherwise he haven't clients
    their is one very large hd etc detector on astalavista.com look in your stats (some thing like that look a bit around)

    regards
    ed

    :



  • : : : Hello everyone,
    : : :
    : : : I want my webpage to find and display the client's IP address for them. Is there a way to use non-cgi, non-asp programming to do this? Is there an HTML or JavaScript way, that would work for IE and Netscape?
    : : :
    : : : Thanks for your help.
    : : :
    : :
    Do you have server side includes or SSI ability on your host. There is a very simple command that works through ssi that you can paste in your html code to display the users ip. I am quite sure it works with both netscape and internet explorer.




    Have fun



  • ruchi12ruchi12 Posts: 1Member
    Hi visit [link=http://www.ip-details.com/]ip-details.com[/link] here they provide HTML code which help to identify the ip address of the client who visited your web page .they also provide code that provide an ip search for your web site users .I hope it will be helpful to you.......
Sign In or Register to comment.