|
This service allows you to preform various network tasks and checks from within flash.
These include: whois, nslookup, dig, traceroute, ping, fortune, and cal. To use, enter the domain name you want to query in the domain parameter and the method in the method parameter. (whois, nslookup, dig, etc). |
|
#include "NetServices.as"
#include "NetDebug.as"
// create result handler for results and error messages.
serviceResult = new Object();
serviceResult.onResult = function(result){
trace(result)
}
serviceResult.onStatus = function(status){
trace(status);
}
// sets up the gateway connection.
var serverConn = NetServices.createGatewayConnection("<PathToGateway>gateway.php");
// sets up the service.
var service = serverConn.getService("http://www.flash-db.com/services/ws/flashNetTools.wsdl", serviceResult);
// Set the params and call the service
// Method options include: whois, nslookup, dig, traceroute, ping, fortune, and cal
params = {
username:'anything',
password:'anything',
domain:'www.flash-db.com',
method:'whois'
}
// calls the method.
service.doNetTools(params);
|