Algorithm for range of dates

Here is a php function which returns from and to date as an array for a range: <?php function get_rangeof_dates($time_frame = ‘all_time’) { $from_date = ”; $to_date = ”; switch($time_frame) { case ‘all_time’:        $from_date = ’1170-01-01 00:00:00′; $to_date = ’2250-12-31 23:59:59′; break; case ‘today’: $from_date = date(‘Y-m-d 00:00:00′); $to_date = date(‘Y-m-d 23:59:59′); [...]

0 Comments , , , , , , , , , , , , , , , , , ,

Facebook application development – Quick note

This is a quick note for myself to remember some tricks while we develop a Facebook application. If you are a beginner in Facebook application development, go here first. If  you an expert in Facebook development, go here. The steps in creating a facebook app. 1) Register an application in facebook 2) Add Canvas URL [...]

0 Comments , , , , , , , ,

Sliding menu using jQuery and ScrollTo

Recently I created a sliding menu for a project using jQuery and ScrollTo functions. See demo: Slider  Menu We can use the jQuery function $(“.menubar”).scrollTo(id_of_element) to scroll any scrollable area to a particular location. The idea behind every smooth sliding is using scroll function with overflow:hidden mode. You can download the source code from : [...]

1 Comments , , , , , , ,

Jmail++ , My Final Year Project

I am writing this topic in sajithmr.com, because i am getting a lot of queries regarding this project from the place I submitted , ProjectGuidance.com , 3 years back. It was a new Webmail Service Idea Developed in JSP . Here is the link. http://www.projectguidance.com/guidance/details/id/36676649 . There are more than 400 replies and most of [...]

24 Comments , , , , , , , , ,

PHP post without curl

You can simulate the post method using php without the help of curl library. download full source code: See the code below: function do_post_request($url, $data, $optional_headers = null) { $params = array(‘http’ =>; array(‘method’ =>; ‘POST’, ‘content’ =>; $data )); if ($optional_headers !== null) { $params['http']['header'] = $optional_headers; } $ctx = stream_context_create($params); $fp = @fopen($url, [...]

9 Comments , , , ,

OpenID Integration PHP

I think you know the use of OpenID. Else go here and learn http://en.wikipedia.org/wiki/OpenID http://openid.net/what/ http://openiddirectory.com/ In a nutshell, the OpenID technology makes life simpler by having only one username and password to remember – yahoo OpenID tour Here the php source code for integrating your site with OpenID. If you have a website which [...]

7 Comments , , , ,

ffmpeg sample code

Install ffmpeg library in your server first. Place a video file of any type on current directory (or anywhere), here it is clock.avi . Click more for source code: extension_loaded(‘ffmpeg’) or die(‘Error in loading ffmpeg’); $ffmpegInstance = new ffmpeg_movie(‘clock.avi’); echo “getDuration: ” . $ffmpegInstance->getDuration() . “getFrameCount: ” . $ffmpegInstance->getFrameCount() . “getFrameRate: ” . $ffmpegInstance->getFrameRate() . [...]

95 Comments , , ,