Get WAN IP Number

Dear All Java Programmer
I'm writing a program to obtain my WAN / router public IP Address
I managed to do it by connecting into remote server (http://checkip.dyndns.org)
it works fine....
My concern is that we cant assume that remote server to be on-service
all the time, and Is that any work-around to this problem?
Any Java snipplet with be greatly appreciated
Honggo

thanks for the reply,
sorry if i misled you regarding the "routing table"
let assume it this way:
I hosted my company website using that dynamic IP Address
Since, it's changing overtime I would like to update the DNS Server
frequently to reflect the current IP Assignment (by our ISP)
Some website can help me do the trick
One of them is: http://checkip.dyndns.org
if u know JSP then it's pretty simple, something like:
<%
out.print( request.getRemoteAddr() );
out.print( request.getRemoteHost() );
%>
my problem is, the abovementioned website is not guaranteed to be
on-service all the time and I want something that can assure me
I will able to retrieve my Router current Dynamic IP whenever i want to
do
any hint/code will be great
Honggo

Similar Messages

  • How to get wan ip.

    How do I get my wan ip-number i.e the ip-number of my router? If I use e.g getLocalHost() I get the lan ip-number e.g 192.168.1.12.

    You can use this method if you're not behind a firewall or a router:
    import java.net.*;
    import java.util.Enumeration;
    public static java.net.InetAddress getInternetAddress()
        try
            InetAddress address;
            for(Enumeration e1 = NetworkInterface.getNetworkInterfaces(); e1.hasMoreElements();)
                for(Enumeration e2 = ((NetworkInterface)(e1.nextElement())).getInetAddresses(); e2.hasMoreElements();)
                    address = (InetAddress)e2.nextElement();
                    if( !address.isLoopbackAddress() && !address.isSiteLocalAddress() )
                        return address;
        }catch(Exception e){}
        return null;
    }Regards

  • My serial number for Logic Studio doesn't work. I used one from a different box and it worked. How can I get a new number?

    My serial number for Logic Studio doesn't work. I used one from a different box and it worked. How can I get a new number?

    http://support.apple.com/kb/TS2005
    http://support.apple.com/kb/HT1861
    https://ssl.apple.com/support/proapps/serialnumbers/

  • How to get total button number in a application

    my application:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Button x="120" y="43" label="Button" id="a"/>
    <mx:Button x="231" y="43" label="Button" id="b"/>
    <mx:Button x="349" y="43" label="Button" id="c"/>
    <mx:Button x="120" y="96" label="Button" id="d"/>
    <mx:Button x="231" y="96" label="Button" id="e"/>
    <mx:Button x="349" y="164" label="Button" id="f"/>
    </mx:Application>
    i want to get all button number,and i want to contorl
    keyboard's up dowm left right key to get the corresponding
    button,please offer code
    ths

    "happyok" <[email protected]> wrote in
    message
    news:g7bk07$o5p$[email protected]..
    > my application:
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    > layout="absolute">
    > <mx:Button x="120" y="43" label="Button" id="a"/>
    > <mx:Button x="231" y="43" label="Button" id="b"/>
    > <mx:Button x="349" y="43" label="Button" id="c"/>
    > <mx:Button x="120" y="96" label="Button" id="d"/>
    > <mx:Button x="231" y="96" label="Button" id="e"/>
    > <mx:Button x="349" y="164" label="Button" id="f"/>
    >
    > </mx:Application>
    >
    >
    > i want to get all button number,and i want to contorl
    keyboard's up dowm
    > left right key to get the corresponding button,please
    offer code
    If you use a click event on each button,
    event.currentTarget.id.charCodeAt(0)-97 in the click handler
    will give you
    the button number.
    For the keyboard input, try
    http://livedocs.adobe.com/flex/3/html/help.html?content=Capturing_User_Input_3.html

  • Hwo to get the spool number from report output

    Hi,
    I am displaying some output in the report using write statements and within my program I need to collect the output written by write statements and send it as an email.So for that I need to generate the spool number and I am using the below code to do that
    CONSTANTS:
        l_linsz TYPE sy-linsz VALUE 201, " Line size
        l_paart TYPE sy-paart VALUE 'X_65_132'.  " Paper Format
      l_uname = sy-uname .
      l_repid = sy-repid .
    *-- Setup the Print Parmaters
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          authority              = space
          copies                 = '1'
          cover_page             = space
          data_set               = space
          department             = space
          destination            = space
          expiration             = '1'
          immediately            = space
          new_list_id            = k_x
          no_dialog              = k_x
          user                   = l_uname
        IMPORTING
          out_parameters         = l_mstr_print_parms
          valid                  = l_mc_valid
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
    *-- Make sure that a printer destination has been set up
    *-- If this is not done the PDF function module ABENDS
      IF l_mstr_print_parms-pdest = space.
        l_mstr_print_parms-pdest = k_lp01.
      ENDIF.
    *-- Explicitly set line width, and output format so that
    *-- the PDF conversion comes out OK
      l_mstr_print_parms-linsz = l_linsz.
      l_mstr_print_parms-paart = l_paart.
      l_variante = sy-slset.
    * submitting the spool request
      *SUBMIT (l_repid) TO SAP-SPOOL*
                       *SPOOL PARAMETERS l_mstr_print_parms*
                       *WITHOUT SPOOL DYNPRO*
                       *AND RETURN.*
    *Calculating the lenth of report name
      lv_len = STRLEN( l_repid ) .
    *consutrucing the database variable  rq2name to search the spool
    *request
      IF lv_len >= 9 .
        CONCATENATE l_repid+0(9)
                    l_uname+0(3) INTO lc_rq2name .
      ELSE.
        lv_len = 9 - lv_len .
        DO lv_len TIMES .
          CONCATENATE lv_temp '_' INTO lv_temp .
        ENDDO.
        CONCATENATE l_repid lv_temp
                    l_uname INTO lc_rq2name .
      ENDIF.
    *selecting the spool request using the above consructed varibale
      SELECT   * FROM tsp01 INTO TABLE lt_tsp01
              WHERE rq2name = lc_rq2name .
    *sorting the interbla table
      SORT  lt_tsp01 BY rqcretime DESCENDING .
    *reading the first spool request
      READ TABLE lt_tsp01 INTO ls_tsp01 INDEX 1.
    but the problem with the above code is I am using variants to execute the report but when the above piece of code is getting executed it is clearing all the variant values on the selection screen and it is defaulting the values on the selection screen.
    Is there any way i can execute the above code without any problem in the selection screen.
    Thanks
    Bala Duvvuri

    Hello Bala,
    I wouldn't SUBMIT the same program to get the Spool number. You can achieve the same by [NEW-PAGE PRINT ON|http://help.sap.com/abapdocu_702/en/abapnew-page_print.htm#!ABAP_ADDITION_1@1@] command.
    Check the code snippet i've provided below:
    DATA: spfli_wa         TYPE spfli,
          print_parameters TYPE pri_params,
          valid_flag       TYPE c LENGTH 1.
    START-OF-SELECTION.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          no_dialog            = 'X'
        IMPORTING
          out_parameters       = print_parameters
          valid                = valid_flag
        EXCEPTIONS
          invalid_print_params = 2
          OTHERS               = 4.
      IF valid_flag = 'X' AND sy-subrc = 0.
    *   1. Write the output to the output list(no spool is generated)
        SELECT carrid connid
               FROM spfli
               INTO CORRESPONDING FIELDS OF spfli_wa.
          WRITE: / spfli_wa-carrid, spfli_wa-connid.
        ENDSELECT.
    *   2. Write the output to SAP spool(no list is displayed)
        NEW-PAGE PRINT ON PARAMETERS print_parameters NO DIALOG.
        SELECT carrid connid
               FROM spfli
               INTO CORRESPONDING FIELDS OF spfli_wa.
          WRITE: / spfli_wa-carrid, spfli_wa-connid.
        ENDSELECT.
        NEW-PAGE PRINT OFF.
        MESSAGE i000(zibi027) WITH 'Spool' sy-spono 'is generated!!!'.
        "You can use the spool number (SY-SPONO) to email the list output
      ENDIF.
    Hope this helps.
    BR,
    Suhas

  • I have lost my iphone, how can i get the IMEI number?

    i have lost my iphone, how can i get the IMEI number?

    If you need the IMEI for an insurance or police report:
    how to find IMEI, etc
    http://support.apple.com/kb/HT4061?viewlocale=en_US&locale=en_US
    But as Carolyn Samit said above, you cannot track the iPhone by IMEI.

  • How do I get my UDID number from my ipod if I can't plug it into itunes?  Apple took it back because it was broken and gave me a new one but I have games and apps that can only be moved over with the UDID from the old pod.

    How do you get the UDID number from your ipod if you don't have the ipod anymore.  The apple store took it because it wasn't working so I can't plug it in to get the number.  Some of my apps are associated wtih that number and I can't move them to my new Ipad without that number.  Any ideas?

    Hi KT. I restored my information back to November 10th and the one app that I need the info on is still empty like I just downloaded it. Do you have another suggestion? I was able to track down my serial number but can't get the UDID without plugging it in and I no longer have it. Suggestions?

  • I still use CS3, yes it's true.  Can I some how get a serial number for CS2?b

    I still use CS3, yes it's true.  However, I have my upgrade copy only, not my CS2, and I just purchased a new iMac Mini.  Therefore, I do not have my SN for CS2.  Can I some how get a serial number for CS2?  I found a link with SN's but none worked.  I wo

    There is a SPECIAL serial number for CS2 that will probably not work for a CS3 upgrade http://helpx.adobe.com/x-productkb/policy-pricing/creative-suite-2-activation-end-life.htm l
    You may still buy CS6 which has a perpetual license... Premiere Pro to get the bundled Encore Creative Suite 6

  • Invalid redemption code - can't get my serial number for Adobe Acrobate XI Standard

    I keep receiving a message, "The code you entered in invalid." for my redemption code.  I used the number one and the small l and a zero and a capital O in my redeption number and still get the same message.  How do I get the serial number so that I can download my Adobe Acrobat XI Standard program that I purchased from Best Buy today?

    Hello - Is the issue still pending

  • How can I get a Mac number without a working phone

    Our Home-Hub dosn't work & BT have cancelled our order for new phone & upgraded Home-Hub.
    Despite attempts to resolve the matter BT will not reply by email but instead keep phoning even though they know our phone isn't working.
    Seems our only recourse is to buy a phone from Argos and change ISP BUT they want me to phone them to get a Mac number.
    Mobiles do not work where I live, we do have an olt plug in phone that dosn't ring but I cannot use it (I'm disabled)
    Does anyone know what I can do?

    Hello,
    Thanks for your email.
    Does the Hub not work because the equipment is now faulty, or do you have a problem with the broadband connection itself?
    I'll be happy to look into this further for you. If you haven't already, please send your details to us through our "Contact us" form, which you can get by clicking on my username. It'll be under "About me" (top-left of the page).
    Best wishes,
    Stephanie
    Stephanie
    BTCare Community Manager
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post. If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • How do i get a serial number for Photoshop that i downloaded from Amazon? [was:thethurm]

    How do i get a serial number for my adobe photoshop software that i downloaded form amazon?

    I've never heard of buying software as a download from Amazon.  Why would you buy there instead of getting it directly from Adobe?
    Was it by chance through a 3rd party seller, not Amazon themselves?
    I should think Amazon will need to be contacted.
    -Noel

  • How to get a random number in a range?

    as title
    how to get a random number in a range?
    like 2000~3000 thks :)

    int between 10 and 20 with the method Math.random():
    public class Rnd
         // Test
         public static void main(String[] args)
             int start=10, end = 30;
             for (int i = 0; i < 10; i++)
                int n = (int)(start + Math.random() * (end-start));
                System.out.println(n);
    }best regards.

  • Can anyone help me get a serial number from Adobe & Identit-e?

    I bought the Adobe Creative Suite 6 Design Standard Student & Teacher edition through Amazon online. I followed the instructions inside the package to verify my eligibilty as an educator. I received a message on the screen after submitting my materials that I was verified & I would be receiving a serial number.  This was on June 1. I contacted Adobe Chat and a rep. told me to wait 2 -3 business days, but still no email with serial number had arrived. On June 7, I contacted Adobe Chat again and the rep told me to contact customer service at identit-e.  I have sent  identit-e two emails with no response. It has been one week of trying to get my serial number from either Adobe or identit-e.  Can anyone help me get my serial number?
    Product Code <removed by moderator>. 
    My work email is <Removed by moderator>

    Jeff,
    I ordered through Amazon and not through Adobe so there is not a record of my order on the Adobe website.  I do have a record of the order with Amazon so I requested a refund through Amazon.  The product is unusable without the serial number.  It has been 8 days since my eligibility  was verified with identit-e.  I have spoken with three Adobe rep.s and two unanswered email to identit -e trying to get the serial number since I was verified as eligible to receive the student/educator version of Creative Suites. I am very disaapointed with the lack of help I have received from Adobe with this issue.
    Being referred to identit-e or to a FAQ page is not what I needed to solve the problem- I needed the serial number  I have lost complete confidence in Adobe's customer service and that the serial number will ever be provided.
    Kathie

  • I bought a volume license for CS6. How do I now get a serial number for prior version (CS5.5)?

    I bought a volume license for CS6 Design Standard. Because of my system restrictions for now I can only run a prior version (CS5.5). I have also previously downloaded its trial version which works perfect. Now, after buying a license for CS6 I would like to get a serial number for a prior version as well. How would I go about receiving it?
    Many thanks in advance!
    Nelle

    Hi Nelle,
    You can request downgrade from Adobe, but you can't get back to CS6 after that, so it might be better to upgrade your system?
    Anyway, in my laptop CS6 has been running faster and better than CS5.5 without any changes to system, so you could give it a try before downgrading...
    Joni

  • How do I get my phone number to appear in the iMessages list

    how do I get a phone number to appear in the iMessages list

    Press and hold on the body in vz msgs then press and hold on face. Press and hold on face again then choose picture and save

Maybe you are looking for