473,406 Members | 2,956 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,406 software developers and data experts.

ping localhost

3
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:Boolean) {
// some code
}
}
callAfterLoadDev = setInterval(loadMyXML,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
Feb 29 '08 #1
3 5742
nomad
664 Expert 512MB
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:Boolean) {
// some code
}
}
callAfterLoadDev = setInterval(loadMyXML,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
Feb 29 '08 #2
nagota
3
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.
Feb 29 '08 #3
nomad
664 Expert 512MB
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
Feb 29 '08 #4

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

Similar topics

3
by: Jason Rodman | last post by:
I have downloaded every example on how to create a ping utility in .Net in both VB and C#, but have been disappointed with the results. I have YET to find an example that returns consistent results...
9
by: Mantorok | last post by:
Hi all I want to ping an ipaddress/host to check for a response. Is there any easy way in C#/.Net to do this? Thanks Kev
0
by: Ed | last post by:
I've attached some VB.NET code I've hacked together (some taken from MS examples & newsgroup postings) that will perform a ping or IcmpSendEcho using the icmp.dll (see this for more info:...
0
by: scotty | last post by:
I need to do a ping scan of a subnet. I can Enum through the IPs and do this, but it takes over 5 minutes as I can only create 1 process at a time. Does anyone know how I can create multiple Ping...
21
by: Neel | last post by:
I am trying to "ping" a remote host in my C++/Redhat Linux code to check whether that host is connected or not. if (0 == system("ping -w 2 192.168.0.2)) But, in both cases...
5
by: Deepak | last post by:
I am programing a ping application which pings various centers . I used timer loop and it pings one by one. Now when i finish pinging one center it should wait for the ping_completed function to...
1
by: Krish | last post by:
All, I have an offline application that works online for some data syncronization. For data syncronization I access a webservice. I want to show whether my application is online or not by checking...
3
by: imughal | last post by:
I got the perl script which does following task. This solution reads in a line from a text file that is passed in as input parameter 1 to a Perl script. This script will then ping the machine...
6
by: Dave Marden | last post by:
I currently use this routine in vbscript to ping computers and get the status of ping to determine whether to try to backup a machine, I am trying to change it to work with vb2003.net I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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:
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.