Check file on internet

Put your problem here if it does not fit any of the other categories.

Check file on internet

Postby suharyadi » Mon Mar 10, 2008 11:14 am

Anyone can help me. how to check file on internet.
i.e
i have file index.php on my web server and i wan't to check if that file exixt or not

any one please help me i need it faster

thank;'s
suharyadi
Freshman
Freshman
 
Posts: 6
Joined: Wed Dec 26, 2007 10:09 am

Top

Postby plusminus » Mon Mar 10, 2008 9:37 pm

Hello suharyadi,

if you start reading from the following inputStream there should be an Exception. (very probably even before!)
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. URL myURL= new URL("http://www.bla.com/index.php");
  2.  
  3. URLConnection conn = myURL.openConnection();
  4.  
  5. conn.connect();
  6.  
  7. InputStream is = conn.getInputStream();
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 14 guests