Thursday, 15 March 2012

[Tutorials] Access Websense Blocked Articles 9lessons.org

Are you working at multi national company, not able to access popular technology blogs powered by wordpress and blogspot articles because of websense firewall rules. I'm introducing (reader.9lessons.info) using that you can access websense blocked articles. It's simple concept URL RSS data using api.thequeue.org and sending request and response from Google feed API. Using this you can build flipboard kind of application.


What is websense? more information. but blocking some useful blogs powered by wordpress and blogger. 
Reader.9lessons.info send clear text request to api.thequeue.org and reading RSS data using Google API feed. Websense reads only Google Feeb API request and response. 
 Javascript
Contains javascipt code. $("#read_button").click(function(){}- read_button is the ID name of input button. Using $(".article_input").val() calling input value. Using RssReader plugin sending RSS data request to Google feed API 
<script type="text/javascript" src="http://ajax.googleapis.com/
ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="jquery.RssReader.js"/>
<script type="text/javascript>
$(document).ready(function () {
var A=$(".article_input");
A.focus();
$("#read_button").click(function(){
var article_url=A.val();
var urlregex = new RegExp("^(http:\/\/[0-9A-Za-z].|https:\/\/[0-9A-Za-z].){1}([0-9A-Za-z]+\.)");
if(urlregex.test(article_url))
{
$('#article').html("Loading...............")
$('#article').rssfeed('http://api.thequeue.org/v1/clear?url='+article_url);
A.val('');
A.focus();
}
else
{
alert("Please submit valid URL");
}
});
});
</script>

HTML Code
<input class="article_input" type="text">
<input type="button"   id="read_button" value=" SUBMIT "><br/>
<div id="article" ></div>

Introduced READ button to view clear text articles
Popup clear text article view at http://www.9lessons.org

jquery.RssReader.js
I had modified jquery.ZRssFeed.js based on requirement. Here is the Google Feed api code part. 
// Create Google Feed API address
var api = "http"+ s +"://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q=" + encodeURIComponent(url);
if (options.limit != null) api += "&num=" + options.limit;
if (options.key != null) api += "&key=" + options.key;
api += "&output=json_xml"

No comments:

Post a Comment