Explore a PHP class object

If you develop website using some framework (Symfony, Codeigniter or Zend etc), you need to play with several system defined objects like routing objects, session objects etc. To see what are the functions available inside an object on run time without referring the parent class documentation, here is a trick: print_r( get_class_methods(get_class($YourObject))); Now you can [...]

0 Comments , , , , , ,

Change web root directory in Symfony 1.4

Symfony usually has “web” as root folder. If you want to change the name of this folder to something else, just rename say “public_html”. This will work if you have made proper changes in your web root. But if you run the symfony commands, say generate: app, or module, the old default “web” directory will [...]

0 Comments

Symfony 1.4 + Codeigniter = Symfony 2

Recently I tried Symfony 2 Sandbox for one of my projects. I realised this fact that Symfony 2 is so powerful because they restructured the Symfony 1.4 architecture and made a system like Codeigniter Framework. I wrote a post some months back about Codeigniter vs Symfony here. I need to re-edit that post now, because, [...]

8 Comments , , , , , , , , ,

Facebook Graph API – The missing part

As you all know recent changes in privacy issues made Facebook to change their basic API and added some security concerns. From my best practise, most of the old applications are safe, but you will be in trouble when you create new application. By default you cannot access user’s photos, profile pictures , albums etc. [...]

4 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 [...]

3 Comments , , , , , , , , , , , , , , ,

PHP Session problem with cloud server

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 [...]

1 Comments , , , , , , , , , , , ,

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 [...]

1 Comments , , , , ,

Multi-language support with PHP

If you aim to create a multi-language  website using PHP + Mysql , remember the following tips. You can use mysql database for this purpose rather than using separate language files as usual content management system does. You can create a table with following structure for this purpose.Table: muli-lang string_id: page_id: en: arb: fr: Here [...]

6 Comments , , , , , , , , ,

Management Lessons – Funny but interesting

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 !  :) Share

0 Comments

Quick tips for https connection (Non secure content warning – IE)

If you are using https pages or some of the pages (payment pages etc) in your website, keep the following in your mind. In some browsers especially IE shows warning of non-secured content in secured page. This cause user the feeling that the website is not secured. Use relative url always. Relative URL means those [...]

1 Comments , , , , , , , , , , ,

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” [...]

1 Comments

jQuery Flip

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

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

0 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 [...]

1 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 Share

0 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 [...]

2 Comments , , , , , , ,

Innovation at its maximum – Bank Run – user interactive movie

I don’t need to explain anything about this game, sorry movie Go to :http://www.bankrungame.com/ Share

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

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/ Share

1 Comments , , , , , , , , , , ,

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

1 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 , , , , , , , ,

PHP Spider – Sphider

We can create a search page for a dynamic website using Database queries and looping over resultant record sets. But what can we do if the website main contains static html files than dynamically populated content. In this case , we usually put Google search box inside website (Google custom search) Sphider is a php [...]

1 Comments , , , , , , , , , , , , ,

Skip or Hide PHP errors / warnings

Errors are hints from compiler for the programmer to correct. But sometimes we face some unwanted or dynamic error. For example, $content = file_get_contents(http://www.twitter.com/feed/234); Here , the url is invalid, or the server of the url is down , PHP shows Warning: Failed to open stream or file access is disabled. Use @ in front [...]

1 Comments

Carousels with jQuery

jCarousel is a simple jQuery plugin to create continuous sliding effect.  I like the way they created the plugin. http://sorgalla.com/jcarousel/ jCarousel uses both javascript array and structured html  for inputing data. The data can be modified with html using post callback functions. For example, you can show flicker images using jCarousel by importing the images [...]

1 Comments , , , , , , ,

Quick Favicon

Some days back I got a new website from my friend Lee to generate favicon for website. Here is the url : http://www.convertico.com/ Thanks Sajith Share

1 Comments , , , ,

jQtouch – amazing jQuery for iPhone

I think, i am becoming jQuery fan day by day. If you have an iPhone or iPod Touch or iPad, try this url in your browser: http://sajithmr.me/jqtouch/demos/main/ You will wonder for some minutes. Yes, it is not a application, it is a website and every action is created by our dearest jQuery using jQTouch library [...]

0 Comments , , , , , , , ,

Flexigrid

In most of the project, we need to write a lot of queries to create admin backend. Especially for report generation.  In old days I used phpTables. But recently I started using Flexigrid, a jQuery plugin for displaying tables. It is very simple to write code and all work in Ajax Here is the url: [...]

1 Comments

Uploadify – A php-flash library to make upload simple

Here is a simple jQuery plugin for creating flash based file uploader. http://www.uploadify.com/ Look some demo here. Include the js file and run the following script to make a file input to flash uploader <script type=”text/javascript”>// <![CDATA[ $(document).ready(function() { $('#fileInput').uploadify({ 'uploader'  : 'uploadify.swf', 'script'    : 'uploadify.php', 'cancelImg' : 'cancel.png', 'auto'      : true, 'folder'    : '/uploads' [...]

0 Comments

Platforms for developing iPhone Application

In 2008, after Steve Jobs released a Software Development Kit  (SDK)for developing iPhone application,  the iPhone OS platform became open for all to development their own application. Xcode is the development environment for iPhone development.  Later a lot of frameworks were introduced over this platform.  The following are new platforms for developing iPhone applications. iPhone [...]

8 Comments , , , , , , , , ,

How to reset mysql root password (Windows)

Of course, it is not my post. But I wrote it here for a back up for myself. I got this from some website, it works ! Steps1) Stop running Mysql service  first (Administrative tools > Services ) Open command prompt (cmd) and reach the directory  (using CD command) where Mysql bin  is installed (eg: [...]

1 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 , , , , , , ,