Go to login

Information can be obtained to other websites from this site, and details are discussed here. If clubs are developing own websites, they can ask their developers to explore this page and make use of it.

To obtain any information, request have to be made by 'GET' method to www.lions318e.com/developer.php. It returns via 'json'.

1. website links

To obtain links to all clubs sites:
a request with parameter: weblink=1, and ajax=1 (if the call is through ajax from javascript)
It returns a JSON with structure [[CLUBNAME,LINK],[CLUBNAME,LINK]...]
I'll post a sample code here: (using php. I prefer php to javascript because, I can cache the information locally, which will speed up the site.)

$file = fopen("dist_links","r");
while (!feof($file)) {
$line = fgets($file);
echo $line;
}
$time =time()-filemtime("dist_links");
if (!$time < 10000 ) {
$file = fopen("dist_links","w");
$result = file_get_contents("http://www.lions318e.com/developer.php?weblinks=1");
$result = json_decode($result);
foreach($result as $ar) {
$line = "<li><div class=\"dist_link_div\"> <a href=http://www.lions.318e.com/\"$ar[1]\"> $ar[0]</a></div></li>\n";
fwrite($file,$line);
}
fclose($file);
}

An implementation can be seen here: www.lionspayyanur.com As the clubs update their site link in the district site, it's reflected automatically.

2. Members list with photos

Request with GET parameters: members=1 , club='CLUB NAME' and if through ajax, ajax=1 It returns a JSON with structure [[NAME,PHOTOLINK],[NAME,PHOTOLINK]...]

example with jquery-ajax:
$(function () {
	$("#divthis").html("loading...");
		$.ajax({
		  dataType: 'jsonp',
	  data: {"members":1,"club":"payyanur","ajax":1},
	  url: 'http://www.lions318e.com/developer.php',
	  success: function (data) {
	  	var output = "";
	  	for (var i =0; i< data.length; i++ ) {
	  		var ar = data[i];
	  		var image;
	  		(ar[1])?image = "http://www.lions318e.com/"+ar[1]:image="";
	  		output+= '<div style=\"width:140px;height:160px; float:left; 
	  		text-align:center;margin:10px\"> <img src="'+image+'" 
	  		width=100 height=130/><br>'+ar[0]+'</div>';
	  	}
	  	$("#divthis").html(output);
	  },
	  error: function() {
	  	$("#divthis").html("error");
	  },
	});
});

An implementation can be seen here. Ajax solution can be implemented in blogs, either as a post or in a gadget.

3. Members with birthdays on the current day

Request with GET parameters: birthday=1 and if through ajax, ajax=1 It returns a JSON with structure [{name=>NAME,club=>CLUB,email=>EMAIL,phone=>PHONE,photo=>PHOTOLINK}...] (array of associative arrays)

An implementation (using ajax call) is seen on the home page.

4. Club projects (only the ones with images and notes shown

Request with GET parameters: projects=1 , club="club_name" and if through ajax, ajax=1. It returns a JSON with structure [ {note=>notes, image=>image},...]