How PHP sessions work

Most of the developers know how to work with PHP Sessions, but don’t know or don’t care to understand how PHP manages to make sessions work.

HTTP is a stateless protocol, due to which its is unable to understand subsequent requests from the same user/client. It considers all requests as “NEW”. So to manage this ‘state’, Sessions and cookies come into the picture.

Please read more over here How Sessions work in PHP

Fedora Linux

Fedora Core 6 Default Wallpapers

I’ll soon be uninstalling Fedora Core 6 and upgrade it to Fedora 7, I’ll miss the wonderful DNA theme only to be welcomed by the new “Flying High” artwork.

I just wanted to backup/show people who missed the default Fedora Core 6 wallpaper.


Default 5:4 Aspect Ratio (Normal Screens)
Free Image Hosting at


Free Image Hosting at

Free Image Hosting at

Note: Above content is available as per GNU Licence

vi / vim

Vim 7.0 Tabs

Vim 7.0 also adds another marvelous feature to this star-studded editor, Tab Browsing

To open a tab, just use the following command

tabe filename

This shall open a new tab.

Vim 7 Tab browsing

To move between tabs you can use tabNext and tabPrevious. Ctrl+PgUp and Ctrl+PgDown work as well in the X version as well as on gnome-terminal.

tabclose shall do the needful as the command states.

vi / vim

Vim 7 Autocomplete

Vim 7.0 was lauched sometime back, but I wasn’t able to check it, But its awesome. The Autocomplete or intellisense built is just too good. It supports various filetypes, it will complete the function as well as show a preview of what arguments are expected out of it.

First check if you have Vim 7 installed and in the VIM directory if you have a folder called autoload. If you have check if it contains *complete.vim files. If everything is Good… lets move…

Lets add PHP autocomplete feature. In your $HOME/.vimrc file add the following command

autocmd FileType php set omnifunc=phpcomplete#CompletePHP

Once done, Open any PHP file and within the <?php tag, write mysql_c and press Ctrl-x Ctrl-o , and here is what happens

Vim 7 PHP autocomplete

You can see a Full list of functions begining with mysql_c

JavaScript Web X|HTML

Ajax: Hotmail vs Yahoo Mail

So both Yahoo Mail! and Hotmail have come up with their AJAX based UIs. Its time I did a comparison.

Yahoo! Mail




Use of Colors, Icons, images

  • Hotmail, has worked upon its old icons, making them with gradient backgrounds though.
  • Yahoo has created bold new Icons, Their Icons are more intuitive. They are bigger, considering the higher resolutions (more than 1024 x 768). Hotmail’s icons’ main image still is small, with Text beside it to help
  • Hotmail has already given multiple themes like Blue, Red, Black, Sliver, Yahoo still lacks it, or atleast I wasn’t able to find it.
JavaScript Web X|HTML

WAI Compatible popup windows

Frequently on websites, we need to pop windows, for slideshows, comments, feedbacks, etc. But want to ensure that the page is also WAI compatible.

So we use a trick, The trick is to give actual page link of the slideshow in the href, so that non standard browsers can access that slideshow, but the Standard Modern browsers that have JavaScript enabled can popup the window.

Use onclick event to pop a new window, but also make sure that a return false statement is present.

WAI Compatible: Window Popups

vi / vim

Vim: File Browsing

Not all must have used this feature of Vim, You can use Vim’s file browsing feature, to select and open a file all you need to do is know a “vsp” command.

To the “vsp” or the Vertical Split command give argument as “.”, a period. Which will prompt Vim to open left bar that will list all directories and files, directories first, just like any directory listing command of your OS.

Vim file browsing

Firefox JavaScript

Escaping Firefox Popup Blocker

As of Firefox 1.5, the popup blocker can be easily be escaped or overridden. The popup blocker works on the principle of blocking popups that spawn without any interaction of the user.

To override this, what is done is add user interaction (unknown to the user…) to spawn a popup.

Spawning popup windows in Firefox

JavaScript Systems Web

FJAX vs AJAX vs plain page

Recently I came across this page FJAX, and this is what it does….

  • Make HTTP calls
  • Get and parse XML
  • Render stuff

You’d say how different is it from AJAX, Well only in a way it uses a stupid Flash file which does all that.

JavaScript Web

IBM’s Live Scoreboard

I was trying to figure out IBM's way of a Live Scoreboard, I thought it must be having AJAX (XMLHttpRequest), but its not. Its using flash. Here is what I've deciphered.