What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

I need some help from anybody with coding/html experience

sanders010

New member
Hey my name is sander and i got a couple of questions, it has to do with copying a website and using it as my own but theres also a app that generates a random link from the site like www.blabla.com/secret/12312o3jaksldja something like that,

i want to make this aswell, would like to copy the site and modify it to my own liking.
Sorry my english is not the best but i hope you get what i mean and if u are interested in helping me out would love to hear from you.
 
So, you are trying to copy the contents of a website, plug it into an app, and call it your own? What is the app called?
 
I'm going to advise you not to do that because it is something that is not what it on the long run and is not going to be to the benefit of your own new website.
 
You can actually get more information on this from YouTube channels on coding. It's my first place to go whenever I'm in such a need for this kind of information and they have never let me down. I kindly suggest that you do the same thing too.
 
Rich (BB code):
Code:
import java.net.*;
import java.io.*;
import java.util.Date;
import java.util.StringTokenizer;
class copyURL
{
  public static void main(String args[])
  {
      if (args.length < 1)
      {
          System.err.println
               ("usage: java copyURL URL [LocalFile]");
          System.exit(1);
      }
      try
      {
          URL           url  = new URL(args[0]);
          System.out.println("Opening connection to " + args[0] + "...");
          URLConnection urlC = url.openConnection();
          // Copy resource to local file, use remote file
          // if no local file name specified
          InputStream is = url.openStream();
          // Print info about resource
          System.out.print("Copying resource (type: " +
                           urlC.getContentType());
          Date date=new Date(urlC.getLastModified());
          System.out.println(", modified on: " +
             date.toLocaleString() + ")...");
          System.out.flush();
          FileOutputStream fos=null;
          if (args.length < 2)
          {
              String localFile=null;
              // Get only file name
              StringTokenizer st=new StringTokenizer(url.getFile(), "/");
              while (st.hasMoreTokens())
                     localFile=st.nextToken();
              fos = new FileOutputStream(localFile);
          }
          else
              fos = new FileOutputStream(args[1]);
          int oneChar, count=0;
          while ((oneChar=is.read()) != -1)
          {
             fos.write(oneChar);
             count++;
          }
          is.close();
          fos.close();
          System.out.println(count + " byte(s) copied");
      }
      catch (MalformedURLException e)
      { System.err.println(e.toString()); }
      catch (IOException e)
      { System.err.println(e.toString()); }
  }
}
You can make a class file in Java. Using just that. It will copy the whole website. You need the java software development kit first on your computer. Then try this out. That program works.
 
Back
Top