Category Archives: Mix

FirePHP with FireBug

Last Couple of months I was using Firebugs ad-dons of Fire Fox.  It helped me lot to debug my css. It’s simply great help for me. Today I came to know about new ad-dons FirePHP which can be used with FireBug. You can debug your php code in your browser. It sounds cool. You don’t have to use print_r or var_dump to debug your php code and massed up your site by dumping your array.

It’s great to use it like same as firebug. Hope it will be useful for php programmers.

To use FirePHP you need the following thigs

After installing those three you should download the FirePHPCore from http://www.firephp.org/HQ/Install.htm.

Setup

Let’s assume your document root is /www/ and it is in your PHP include path.

Step 1 Locate the server library

Locate the /lib/FirePHPCore folder in the FirePHPCore archive and move it into your document root.

/www/FirePHPCore/fb.php
/www/FirePHPCore/FirePHP.class.php
/www/FirePHPCore/LICENSE

You can skip this step if you are using PEAR. Make sure the PEAR repository is in your include path.

Step 2 Include the server library

Create a file at /www/Index.php and open it in your editor.

require_once(‘FirePHPCore/FirePHP.class.php’);

Step 3 Start output buffering

ob_start();

Now That’s it. It’s now time to play. Your first Log Message

$firephp = FirePHP::getInstance(true);

$var = array('i'=>10, 'j'=>20);

$firephp->log($var, 'Iterators');

Console_HelloWorld_Screenshot
FirePHP Official Site:  http://www.firephp.org

The Site I got the information: http://sixrevisions.com/web-development/how-to-debug-php-using-firefox-with-firephp/

CKEditor the new version of FCKEditor and new file manager CKFinder

Last couple of days I was using FCKEditor. And i found it really good. Client likes it.  I also become fan of it.
Recently I came to know that there is new version of FCKEditor. Which is called CKEditor 3.0. This is new
of FCKEditor. It is faster and much easy to use. FCKEditor in PHP you have to include PHP codes. But CKEdiotr
you just have to include a js file in header that’s it. You can use it to any text area. It has lots of new features
and really faster than the FCKEditor. Hope I will go for CKEditor for next days until there is something new.
Really loved it’s UI and flexibility.

The officicial site of CKEditor.

CKEditor 3.0
CKEditor 3.0

There is another release of File Manager Which is called CKFinder

CKFinder
CKFinder

Who Moved My Cheese?

I just read a book today.“Who Moved My Cheese?”-by Spencer Jhonson. This book is really great. I am sure it will change your life and make you adopt with change. Just go through the book it will not take more than 1 and half hour. But this book may be change lot in your whole life. Just let me know what do you think which one is your character in the book. I just give a brief about the book taken from the book.

Parts of All of Us

The Simple and The Complex

The four imaginary characters

depicted in this story —

the mice: “Sniff” and “Scurry;’ and

the Little people: “Hem” and “Haw” —

are intended to represent the simple and

the complex parts of ourselves, regardless of

our age, gender, race or nationality.

Sometimes we may act like

Sniff

Who sniffs out change early, or

Scurry

Who scurries into action, or

Hem

Who denies and resists change as he fears

it will lead to something worse, or

Haw

Who learns to adapt in time when he sees

changing can lead to something

better!

Whatever parts of us we choose to use,

we all share something in common:

a need to find our way in the Maze

and succeed in changing times.

Who Moved My Cheese?

Who Moved My Cheese? is the story of four characters living in a “Maze” who face unexpected change when they discover their “Cheese” has disappeared. Sniff and Scurry, who are mice, and Hem and Haw, little people the size of mice, each adapt to change in their “Maze” differently. In fact, one doesn’t adapt at all…

This timeless allegory reveals profound truths to individuals and organizations dealing with change. We each live in a “Maze”, a metaphor for the companies or organizations we work with, the communities we live in, the families we love places where we look for the things we want in life, “Cheese”. It may be an enjoyable career, loving relationships, wealth, or spiritual peace of mind. With time and experience, one character eventually succeeds and even prospers from the change in his “Maze”.In an effort to share what he has learned along the way, he records his personal discoveries on the maze walls, the “Handwriting on the Wall”. Likewise, when we begin to see the “writing on the wall”, we discover the simplicity and necessity of adapting to change.

Download Link

7 things you may not know about me!!

originally started by tony bibbs it is a funny thing indeed. I was tagged by nurul ferdous. Here is my seven secrets those some of you may don’t know.

1) I become fat. J
2) I am wearing glass.
3) I jump from class 3 to class 5. I missed class 4
L
4) My aim was to be a pilot. But now i am pilot of PHP.
5) I am in KSA from 1991. But my mind is in my country.
6) Sleep too much. I mean a lazy guy.
7) Trying to avoid bad habits and become a hard worker.

Here is 7 person I am tagging them
1) A.N.M. Saiful
2) Mahmud Ahsan
3) Arif Hossain
4) Sadiqur Rahman
5) Wei Dai
6) el NiNo
7) abir

And here goes the rules:

– Link your original tagger(s), and list these rules on your blog.
– Share seven facts about yourself in the post – some random, some weird.
– Tag seven people at the end of your post by leaving their names and the links to their blogs.
– Let them know they’ve been tagged by leaving a comment on their blogs and/or Twitter.

Use any font in your website using SIFR


You like to use your favorite font in your website. But if the user doesn’t have that font installed in his computer then it will not show the proper font. What will you do now? Is there any solution of using font in a website that will show any browser and any pc correctly?
http://wiki.novemberborn.net/sifr3

Yup there is some solution of it. SIFR is one of it. Which recommended by W3C. I use it in one of my website(http://www.toasted2go.com/demo3/). It works well. But it takes little time to load the webpage because of flash. It’s free. You can download the package and know detail about SIFR from following link. Hope you will enjoy it. If you face any problem to use it feel free to ask me.

Redirect visitors to new Page

Sometime we need to redirect a visitor to another webpage. There is so many solution to redirect a user. I will show some of them which I know.

HTML

Code

<html>
<head>
<title>Html Redirect Page</title>
<meta http-equiv=”REFRESH” content=”5; url=http://www.mydomain.com”>
</ head >
<body>
You will be redirect within 5 seconds..
</body>
</html>

Description

<meta http-equiv=”REFRESH” content=”5; url=http://www.mydomain.com”>

// This is the part which is redirecting the current page to www.mydomain.com

content=”5; // This means it will wait 5 second and then redirect. you can increase and decrease this number.

PHP

Code

header(“Location: index.php“);

// You have to call this line before any output.

JavaScript

Code

<SCRIPT language=”JavaScript1.1″>
Redirect to main Page
location.replace(“index.php”);
</SCRIPT>

In some server non of above work as redirection. I don’t know why. But the following code work well. Does
anyone know why?

<?php
header(“Pragma: public”);
header(“Expires: 0”);
header(“Cache-Control: must-revalidate, post-check=0, pre-check=0”);
header (“Location: http://www.mydomain.com/”.time());
?>