Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
public class api_calendar { private DefaultHttpClient httpclient; private HttpPost httpost; private HttpResponse response; String username="test@gmail.com"; String password="password"; private String Auth; private BasicHeader header; private HttpGet httpget; public api_calendar() { httpclient = new DefaultHttpClient(); httpost = new HttpPost("https://www.google.com/accounts/ClientLogin"); } public boolean connect() { List nvps = new ArrayList (); nvps.add(new BasicNameValuePair("Email", username)); nvps.add(new BasicNameValuePair("Passwd", password)); nvps.add(new BasicNameValuePair("source", "MyApiV1")); nvps.add(new BasicNameValuePair("service", "cl")); try { httpost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.DEFAULT_CONTENT_CHARSET)); response = httpclient.execute(httpost); if( response.getStatusLine().getStatusCode()!=200 )return false; convertStreamToData(response.getEntity().getContent()); header=new BasicHeader("Authorization","AuthSub token=""+Auth+"""); String feedUrl = "http://www.google.com/calendar/feeds/""+username+""/private/full"; httpget = new HttpGet(feedUrl); httpget.addHeader(header); response = httpclient.execute(httpget); Log.d("test","test "+convertStreamToDisplay(response.getEntity().getContent()) ); // print } catch (UnsupportedEncodingException e) { e.printStackTrace(); return false; } catch (ClientProtocolException e) { e.printStackTrace(); return false; } catch (IOException e) { e.printStackTrace(); return false; } return true; } public void convertStreamToData(InputStream is) { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); String line = null; try { while ((line = reader.readLine()) != null) { Log.d("line ", ": "+line); if( line.startsWith("Auth=")) { Auth=line.substring(5); Log.i("auth",": "+Auth); } } } catch (IOException e) { e.printStackTrace(); } finally { try { is.close(); } catch (IOException e) { e.printStackTrace(); } } } public String convertStreamToDisplay(InputStream is) { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); StringBuilder sb = new StringBuilder(); String line = null; try { while ((line = reader.readLine()) != null) { sb.append(line + "n"); } } catch (IOException e) { e.printStackTrace(); } finally { try { is.close(); } catch (IOException e) { e.printStackTrace(); } } return sb.toString(); } }