Recently Added

Facebook Graph API for PHP

Posted by Sajith M.R in general on 15. Jul, 2010 | No Comments

Facebook Graph API for PHP

Like the old REST API, you don’t need to add 2-3 files for Facebook PHP SDK. The new graph api comes in a single file which is located at http://github.com/facebook/php-sdk/
Copy the facebook.php file in to your webroot and include this file in your php code.
require_once(’facebook.php’);
To work fully functional, you need CURL and JSON installed in [...]

PHP Session problem with cloud server

Posted by Sajith M.R in php on 08. Jul, 2010 | No Comments

There is a very strange issue with PHP session when you prefer session to save in files other than database (normal session).
The problem is: some times you can access all the saved session values from $_SESSION and sometimes it returns a empty array.
If you refresh 10 times, perhaps 4 times you will get session and [...]

VARDUMP.IT – PHP remote debugging console

Posted by Sajith M.R in php, php source code, webworld on 11. Jun, 2010 | 1 Comment

VARDUMP.IT – PHP remote debugging console

In PHP coding, we spend most of the time for debugging. Either we use echo, print_r or var_dump to check variable values or check whether a particular function is executing or not.
These all things are outputting something to browser. This is not applicable in case of redirection, or image processing (GD) or sometimes with callback [...]

Management Lessons – Funny but interesting

Posted by Sajith M.R in php on 22. May, 2010 | No Comments

A very interesting presentation I got from  one of my friend last week. I found somebody uploaded that in slideshare. It is here.
Remember, you can forward this ppt to your friends. Only friends ! Don’t forward to your company members or to your boss !  :)

IE6 Transparent PNG problem

Posted by Sajith M.R in php on 14. May, 2010 | 1 Comment

IE6 Transparent PNG problem

We all have faced this problem during HTML development. Internet Explorer 6 renders transparent PNG images in different way.  It puts some other color , it damages the design.
One solution is create gif images for IE6 and mention those in separate style sheet file for IE6
<!–[if IE 6]>
<link rel=”stylesheet” href=”css/style-ie6.css” type=”text/css” media=”screen” />
<![endif]–>
A simpel [...]

jQuery Flip

Posted by Sajith M.R in html, webworld on 13. May, 2010 | No Comments

You can create iPhone style flip using jQuery.
Visit: http://lab.smashup.it/flip/ for more details

Algorithm for range of dates

Posted by Sajith M.R in php, php source code on 12. May, 2010 | No Comments

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′);
break;
[...]

MxCheck PHP library

Posted by Sajith M.R in php on 11. May, 2010 | No Comments

MxCheck PHP library

This library can be used to check whether an email address is valid or not before sending any email.
This is not a syntax validation. It communicates with mail server and check whether the account is really existing or not.
The steps involved in this library are:

Check syntax of email ( if it is not a valid [...]

HTML5 – Demos

Posted by Sajith M.R in php on 10. May, 2010 | No Comments

HTML5 – Demos

1) Amazing game developed with html5 (without any flash)

http://www.kevs3d.co.uk/dev/asteroids/
2) 12 Examples
http://htmlfive.appspot.com/
3) HTML5 Demos
http://html5demos.com/
4) HTML5 Image uploader

http://demos.hacks.mozilla.org/openweb/imageUploader/
5) A list of html5 bookmarking
http://delicious.com/khalweir/html5
6) A good HTML5 implementation

http://www.nissanusa.com/leaf-electric-car/
7) Basic video player

http://htmlfive.appspot.com/static/video.html
A simple game

http://www.benjoffe.com/code/games/torus/
9) A good presentation
http://apirocks.com/html5/html5.html#slide1

Facebook Styles from jQuery

Posted by Sajith M.R in php on 08. May, 2010 | No Comments

Facebook Styles from jQuery

A wide range of jQuery plugin which help us to create Facebook style designs are follows:
I got this huge collection from this website. I am just rewriting that post here.
1) Facybox

Website here
2) Facebox

http://famspam.com/facebox
3) FCBKComplete

Go to webstie
4) Facebook style registration

Go to website
5) Gmail/Facebook style jQuery chat

Go to website
6) Facebook style comment using jQuery

Go to website
7) Facebook [...]

Jing – Screen capture software

Posted by Sajith M.R in webworld on 07. May, 2010 | 1 Comment

Jing – Screen capture software

This is just an information for those who wanted to record on screen tutorial videos or capture images. I use Jing. A free version for software is available. It is for both Mac and Windows. It is very easy to make screen capture videos
Go to: http://www.jingproject.com/

HTTP authentication from PHP

Posted by Sajith M.R in php on 06. May, 2010 | 1 Comment

HTTP authentication from PHP

Do you know you can implement http authentication using php code? HTTP authentications are those you see when  you open control panel or administrative backend website, prompting for username and password in html  authentication prompt.

This can be done in php using following code:
<?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header(‘WWW-Authenticate: Basic realm=”My Realm”‘);
header(‘HTTP/1.0 401 Unauthorized’);
echo ‘Text to [...]