why you don't use the API ?
cubocik
Posts
-
Exception -
How to login server of router?The authentication ? There is a house where to known people they have a secret ring ... what do you need to enter in the house ? if you have no key ? you need to POST the secret ring.. First step again : You need to authenticate yourself, when you put in the browser 192.168.0.254 what appear ? a windows to insert yours creds, that windows is make from anything right ? otherwise you have the key ? what do you need to enter in the house? The place where you insert the key (that i dont know how to say in english lol ) if you have the creds you need to check if your router can be access by TELNET or SSH !! or you must find the protocol that is used in the loggin of the router , for exemple wireshark is good for that job
-
How to login server of router?First you need to communicate with the router, I mean, for eg. in your webbrowser if you write 192.168.x.x (router login webpage) you can access to your webconfig right? And to turn On/Off your wifi you must go to the right place right? Its like this .. In your android app you must in first place know how to connect with router ip, if you can do this almost 60% of path is done, next you need to know how you turn On/off , and how do you know ? Almost of the router have one ssh login or telnet login, and almost of the routers have commands to open ports for example, you need to check you router manual and see what is the command to turn On/Off you wifi with terminal (telnet or ssh).
-
For Java ProjectIf you want to write a java project you need to code, what is your project ? you must post more details...
-
am a beginnersorry lol
-
help me pleaseMay you please encote correctly your code and post what errors you have ?
-
am a beginnerIn oracle webpage you are able to find good tutorials!
-
Webpage saver -- helpThanks for the answer I just forgot the line l=in.nextLine(); If not the program will read infinite time the first Line lol, Thanks !!!!
-
Webpage saver -- helpwhat debugger you advice?
-
Webpage saver -- helpAnother I checked now with iol.pt , and when it was running its never finish running and when I control+C it it created a 1,5Gb
-
Webpage saver -- helpIm nice , ty thats work but.. for only this site , im trying for example facebook and its save a blank page
-
Webpage saver -- helpCode:
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;public class webpagesaver{
public static void main(String[] args) throws IOException{String saveFile = "PaginaCopiada.html"; //name of SaveFile
String location = "http://www.sapo.pt"; // website url withou #
URL url = new URL(location);
URLConnection conn = url.openConnection();
InputStream is = conn.getInputStream();
conn.connect();
BufferedWriter out = new BufferedWriter(new FileWriter(saveFile));
BufferedReader in = new BufferedReader(new InputStreamReader(is));
String l = out.readLine();
while(l!=null){
out.write(l);
out.newLine();
}
in.close();
out.close();}
}Compiling messages Code:
URLConnection conn = url.openConnection();
^
symbol: class URLConnection
location: class webpagesaver
webpagesaver.java:19: error: cannot find symbol
InputStream is = conn.getInputStream();
^
symbol: class InputStream
location: class webpagesaver
webpagesaver.java:23: error: cannot find symbol
String l = out.readLine();
^
symbol: method readLine()
location: variable out of type BufferedWriter
3 errorsEdit/Delete Message
-
Webpage saver -- helpHey im kind new in this , but I have coded this but It doesn't work... import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; public class webpagesaver{ public static void main(String[] args) throws IOException{ URLConnection conn = url.openConnection(); conn.connect(); InputStream is = conn.getInputStream(); String saveFile = "PaginaCopiada.html"; //name of SaveFile String location = "http://www.sapo.pt"; //ask website URL url = new URL(location); BufferedWriter out = new BufferedWriter(new FileWriter(saveFile)); BufferedReader in = new BufferedReader(new InputStreamReader(is)); String l = out.readLine(); while(l!=null){ out.write(l); out.newLine(); } in.close(); out.close(); } } The objective is : Put website link and Save all the page.. May you help me ?