Solved Get an Integer from a Website

Discussion in 'Plugin Development' started by deleted_91027365, Jun 6, 2015.

Thread Status:
Not open for further replies.
  1. Hey,

    I want to get an Integer (like 45) from a website. So, how could I connect to the Domain?
    On the Site is only these int and nothing else. Or should I create a txt file which contains the int?
     
  2. Offline

    I Al Istannen

    @dunklesToast That should suit you for the basic structure, but a text file would be much easier.
     
  3. Offline

    Gingerbreadman

    Code:
    BufferedReader br = new BufferedReader(new InputStreamReader(new URL("insert website url").openStream()));
    
    Integer i = Integer.ParseInt(br.readLine());
     
    deleted_91027365 likes this.
  4. Offline

    Monollyth

    I am pretty sure the way most large networks get integers off websites involves reading the integer from their databse. However, I could be wrong, and I believe there is a way to do this without reading from a database, as @Gingerbreadman said.
     
Thread Status:
Not open for further replies.

Share This Page