Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

cubocik

@cubocik
About
Posts
13
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Exception
    C cubocik

    why you don't use the API ?

    Java help question

  • How to login server of router?
    C cubocik

    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

    Java java android sysadmin help tutorial

  • How to login server of router?
    C cubocik

    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).

    Java java android sysadmin help tutorial

  • For Java Project
    C cubocik

    If you want to write a java project you need to code, what is your project ? you must post more details...

    Java java tutorial

  • am a beginner
    C cubocik

    sorry lol

    Java tutorial java learning

  • help me please
    C cubocik

    May you please encote correctly your code and post what errors you have ?

    Java java help tutorial

  • am a beginner
    C cubocik

    In oracle webpage you are able to find good tutorials!

    Java tutorial java learning

  • Webpage saver -- help
    C cubocik

    Thanks for the answer I just forgot the line l=in.nextLine(); If not the program will read infinite time the first Line lol, Thanks !!!!

    Java csharp java html help question

  • Webpage saver -- help
    C cubocik

    what debugger you advice?

    Java csharp java html help question

  • Webpage saver -- help
    C cubocik

    Another 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

    Java csharp java html help question

  • Webpage saver -- help
    C cubocik

    Im nice , ty thats work but.. for only this site , im trying for example facebook and its save a blank page

    Java csharp java html help question

  • Webpage saver -- help
    C cubocik

    Code:

    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 errors

    Edit/Delete Message

    Java csharp java html help question

  • Webpage saver -- help
    C cubocik

    Hey 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 ?

    Java csharp java html help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups