Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jaykid on github.
  • I am jayk1d (https://keybase.io/jayk1d) on keybase.
  • I have a public key ASD0s7T_srYAz_0LeBWPpAMl0KhYqqFdjSDZUIb2SRP7EAo

To claim this, I am signing this object:

@JayKid
JayKid / RSSFeedParser
Created January 14, 2014 11:50
A simple feed parser (tested against WP Feed) in PHP
<?php
class RSSFeedParser {
private $feed_url;
public function __construct($feed_url)
{
$this->feed_url = $feed_url;
}
@JayKid
JayKid / gist:1700991
Created January 29, 2012 22:14
[Java] Get Html Content from a Url
private String getHtmlContent(String url) throws Exception, IOException {
HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet(url);
HttpResponse response = client.execute(request);
String html = "";
InputStream in = response.getEntity().getContent();
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
StringBuilder str = new StringBuilder();