Re: How to send HTTP request from specific IP?
I make this project in my college project, in this project I use following code to send HTTP request from specific IP. I think this code will help you to solve your problem.
public class clspeci
{
public static void main ( String args [] )
{
String argu = args [1];
try {
ADRES adres = new ADRES(argu);
HttpADRESConnection conn = (HttpADRESConnection) adres.openConnection();
InputStream arguuestStream = conn.getInputStream();
BufferedOutputStream test = new BufferedOutputStream(new FileOutputStream("your web address"), 4 * 1024);
byte b = 0;
while ((b = (byte) arguuestStream.read()) != -1) {
test.write(b);
}
test.flush();
} catch (Exception ex) {
ex.printStackTrace(System.err);
}
}
I'm the Proud Owner of the most dangerous weapon
known to man kind: Human Brain
Bookmarks