これを試してみてください、それは魔法のように機能します..........。
キーと秘密:
private final String key = "86b780aec0cee918718d7eb2fa084df412771c17";
private final String secret = "d3e3fa0a1fc6a35ac02aa591ed32ecaa750df9a7";
セッションを作成する方法:
public void xmlCreateSession(){
String createSession = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"\n"+"<request>"+"\n"+"<token>"+"</token>"+"\n"+"<key>"+this.getKey()+"</key>"+"\n"+"<secret>"+this.getSecret()+"</secret>"+"\n"+"</request>";
firingUrl = "https://int.yumzing.com/index.php?func=sessionCreate";
// firingUrl = "http://199.87.235.147/sessionCreate";
//firingUrl = "https://int.yumzing.com/sessionCreate";
String tempCreate = postData(firingUrl, createSession);
this.getMToken(tempCreate);
System.out.println("getToken value "+this.getToken());
}
IPを見つける方法:
public void xmlUserIp(){
String userIp = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"\n"+"<request>"+"\n"+"<token>"+this.getToken()+"</token>"+"\n"+"</request>";
firingUrl = "https://int.yumzing.com/index.php?func=userIp";
String tempIp = postData(firingUrl, userIp);
this.getMIp(tempIp);
System.out.println("getToken value "+this.getIp());
}
IPに基づいて情報を取得する方法:
public void xmlUserLocation(){
this.xmlUserIp();
System.out.println("With in xmlUserLocation-"+this.getToken()+" "+this.getIp());
String userLocation = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"\n"+"<request>"+"\n"+"<token>"+this.getToken()+"</token>"+"\n"+"<ip>"+this.getIp()+"</ip>"+"\n"+"</request>";
firingUrl = "https://int.yumzing.com/?func=userLocation";
System.out.println("With in xmlUserLocation-"+this.getToken()+" "+this.getIp());
String tempLoc = postData(firingUrl, userLocation);
System.out.println("In xmluserLoc"+tempLoc);
this.getMLocation(tempLoc);
System.out.println("getToken value "+this.getCountry());
System.out.println("getToken value "+this.getState());
System.out.println("getToken value "+this.getCity());
System.out.println("getToken value "+this.getLatitude());
System.out.println("getToken value "+this.getLongitude());
}