ping localhost

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nagota
    New Member
    • Feb 2008
    • 3

    ping localhost

    Hi

    I want to load some xml data from the server running on mymachine (localhost), from a flash swf embedded on an external website. The localhost has crossdomain.xml as well, but the problem is its not always running. So in case its not running I want to get some error code, so that i can ping again after some time.

    I use this code..

    function loadMyXML() {
    getDeviceId_xml = new XML();
    getDeviceId_xml .ignoreWhite = true;
    getDeviceId_xml .load("http://localhost:8081/myXML.xml");
    getDeviceId_xml .onLoad = function (success:Boolea n) {
    // some code
    }
    }
    callAfterLoadDe v = setInterval(loa dMyXML,4000);



    it works fine when i run it locally, but when i embed it in external website, it hangs. Is there a way I could set timeout. Basically i think its looking for crossdomain xml which it won't get as server is not running.

    Is there any other way, where I could just ping a server and know if its running or not ?

    Please help
    --
    Nagota
  • nomad
    Recognized Expert Contributor
    • Mar 2007
    • 664

    #2
    Originally posted by nagota
    Hi

    I want to load some xml data from the server running on mymachine (localhost), from a flash swf embedded on an external website. The localhost has crossdomain.xml as well, but the problem is its not always running. So in case its not running I want to get some error code, so that i can ping again after some time.

    I use this code..

    function loadMyXML() {
    getDeviceId_xml = new XML();
    getDeviceId_xml .ignoreWhite = true;
    getDeviceId_xml .load("http://localhost:8081/myXML.xml");
    getDeviceId_xml .onLoad = function (success:Boolea n) {
    // some code
    }
    }
    callAfterLoadDe v = setInterval(loa dMyXML,4000);



    it works fine when i run it locally, but when i embed it in external website, it hangs. Is there a way I could set timeout. Basically i think its looking for crossdomain xml which it won't get as server is not running.

    Is there any other way, where I could just ping a server and know if its running or not ?

    Please help
    --
    Nagota
    do you want to write an xml or do you want to do it thro Line Command.
    if line command the you will need to know the IP address.
    like this in Line command
    Ping the ip address;

    nomad

    Comment

    • nagota
      New Member
      • Feb 2008
      • 3

      #3
      Originally posted by nomad
      do you want to write an xml or do you want to do it thro Line Command.
      if line command the you will need to know the IP address.
      like this in Line command
      Ping the ip address;

      nomad
      I need to do it from flash, i need to know if a server is running or not. Like say, if i want to ping yahoo.com, is it possible to get a response like "request timed out" or an error code, if the server is not running.

      all inside an embedded flash, on a html page.

      Comment

      • nomad
        Recognized Expert Contributor
        • Mar 2007
        • 664

        #4
        Originally posted by nagota
        I need to do it from flash, i need to know if a server is running or not. Like say, if i want to ping yahoo.com, is it possible to get a response like "request timed out" or an error code, if the server is not running.

        all inside an embedded flash, on a html page.

        Tried to find some info your.
        take a look at this book it might have what you want.
        Programming Flash Communication Server
        By Brian Lesser, Giacomo Guilizzoni, Robert Reinhardt, Joey Lott, Justin Watkins


        do a google seach on it.

        nomad

        Comment

        Working...