Page 1 of 1

I am getting 503 Exception

Posted: Sat Aug 24, 2013 9:44 am
by tharuntej
I am trying to extract the data of few Ip addresses.
It worked for sometime and currently. The following is the code.

Code: Select all


public class URLConnectionReader {
    public static void main(String[] args) throws Exception {
        URL oracle = new URL("");
        URLConnection yc = oracle.openConnection();
        BufferedReader in = new BufferedReader(new InputStreamReader(
        String inputLine;
        while ((inputLine = in.readLine()) != null) 
I am getting this exception..

Exception in thread "main" Server returned HTTP response code: 503 for URL:
at com.tharun.example.URLConnectionReader.main(
Any one please help me.

Thank you.

Re: I am getting 503 Exception

Posted: Sat Aug 24, 2013 10:31 am
by Chrispcritters
Basically, we don't allow you to do that. A "few" is defined as 2 or 3. For our rate limiting to kick you've gone well beyond that.

Please see the website terms of use and our API usage page.

Re: I am getting 503 Exception

Posted: Wed Aug 28, 2013 6:42 am
by Voodoo
If you use Socket and input/outputStream you'd be able to read everything. URLConnection is used only by casual "programmers" ;)

Code: Select all

                Socket soc = new Socket("", 80);                
                OutputStream out = soc.getOutputStream();
                // don't modify this string
                out.write(("GET /ip/ HTTP/1.1\r\n"+
                                "User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/10.0\r\n"+
                                "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n"+
                                "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3\r\n"+
                                "Accept-Encoding: gzip,deflate,sdch\r\n"+
                                "Accept-Language: en-us,en;q=0.5\r\n"+
                                "Connection: close\r\n\r\n").getBytes());
                InputStream is = soc.getInputStream( );