How PHP sessions work

October 6, 2009

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

Read the rest of this entry »

Fedora Core 6 Default Wallpapers

August 12, 2007

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

Default 5:4 Aspect Ratio (Normal Screens)
Free Image Hosting at www.ImageShack.us

Default-Wide

Default-Dual
Free Image Hosting at www.ImageShack.us

Default-Dual-Wide
Free Image Hosting at www.ImageShack.us

Note: Above content is available as per GNU Licence

Vim 7.0 Tabs

December 23, 2006

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.

Vim 7 Autocomplete

December 21, 2006

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

Read the rest of this entry »

Ajax: Hotmail vs Yahoo Mail

October 24, 2006

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

Yahoo! Mail

yahoo-mail-ajax.gif

Hotmail

hotmail-ajax.png

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.

Read the rest of this entry »

WAI Compatible popup windows

September 20, 2006

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

Vim: File Browsing

August 23, 2006

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

Read the rest of this entry »

Escaping Firefox Popup Blocker

July 26, 2006

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

Read the rest of this entry »

FJAX vs AJAX vs plain page

June 27, 2006

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.

Read the rest of this entry »

IBM’s Live Scoreboard

June 3, 2006

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.

Read the rest of this entry »


Follow

Get every new post delivered to your Inbox.