
Untitled
By: a guest on Feb 12th, 2012 | syntax:
Java | size: 0.77 KB | hits: 58 | expires: Never
public String prepareOnlineSearchURL(String server) throws MalformedURLException, IOException {
choice = 3;
choiceSearchULR();
server = server.replaceAll(" ", "+");
urltibia = new URL(mainurl, server);
return getSiteContent();
}
private void choiceSearchULR() throws MalformedURLException {
switch(choice) {
case 1: mainurl = new URL("http://www.tibia.com/community/?subtopic=characters&name=");
break;
case 2: mainurl = new URL("http://www.tibia.com/community/?subtopic=guilds&page=view&GuildName=");
break;
case 3: mainurl = new URL("http://www.tibia.com/community/?subtopic=worlds&world=");
break;
//--
}
}