public static String getLocationData() {

        HttpURLConnection urlConnection = null;
        BufferedReader reader = null;
        String geoip = null;
        final String GEO_IP = "http://www.telize.com/geoip";
        
        try {
        URL url = new URL(GEO_IP);

        urlConnection = (HttpURLConnection) url.openConnection();
        urlConnection.setRequestMethod("GET");
        urlConnection.connect();

        InputStream inputStream = urlConnection.getInputStream();
        StringBuilder buffer = new StringBuilder();
        if (inputStream == null) {
            return null;
        }
        reader = new BufferedReader(new InputStreamReader(inputStream));

        String line;
        while ((line = reader.readLine()) != null) {
            buffer.append(line + "\n");
        }

        if (buffer.length() == 0) {
            return null;
        }
        geoip = buffer.toString();
        }catch (IOException e) {
            return null;
        }finally {
            if (urlConnection != null) {
                    urlConnection.disconnect();
                }
                if (reader != null) {
                    try {
                        reader.close();
                    } catch (final IOException e) {
                    }
                }
        }
        return geoip;
    }