Explore Yourself !!!


Left arm injured badly
October 19, 2008, 2:45 am
Filed under: It's My Life

Yesterday when my MBA class was finished i was getting down from building quickly to meet with one of my friend who was near my campus. But when i appear at the bottom of last stair my sandel sleeped and i was getting down. I was falling down backward and have tried to prevent it using my left hand. As a result my arm and wrist joint jurked badly. It was my bad luck that i injured badly but good luck is it’s not broken. Slowly pain grows high and high. Moreover, when i come back home arm joint become fatty slowly. Pain was incresing gradually. At mid night it seems to me, i can’t move my left hand without the help of right hand. Thanks to allah, both of my hands not injured.

Finally today morning, pain reduces little bit. Taking pain killer and IcE therapy helping me to get better.  Right now it’s after lunch my condition is much better then last night. At least i can write something, although pain not removed completely. I think, 2-3 days more need to fully cure of pain. Not sure today i am able to go university or not!!!

Thanks to allah injury is not in serious level and pain reducing slowly. Still i can’t band my left hand but feel much much much better then last night. Prey for me friends.

Khalpar theke Aminul Islam
Uttara Village, Dhaka
Capital of Bangladesh
South Asia, Asia, Earth



WELCOME TO SAINT MARTIN ISLAND!
October 16, 2008, 1:20 pm
Filed under: Tourist Places | Tags: , , , ,

Saint martin is an excellent Island in bangaldesh. I invite those guys who love travelling. It’s very near to any place. Only few hours takes you to saint martin. Some how you have to go Teknaf. Then hire a boat (trollar) or a ticket for ship. I travel both ways. The feelings of ship is exactly as volvo bus. But boat feelings!! Really nice. You get perfect travelling feelings through boat. When you are near to saint martin you get such a feelings you never been. Be carefull while travelling through or boat. Dont try to drop at sea. Whatever you have life jacket or not. If you are very much curious then first try to measure the wave and wind speed. Now through a bottle and watch it’s path of departure. Now decide yourself. If you found wind and wave are under control then why you will be late. Don’t forget to wear Life Jacket. Best of luck. Best time is while you are going to saint martin at morning. Taking attept when you are back is more risky.

First manage a motel within few minutes. There are few motels you found. All most all of them provide good services. Now come to sea for bath. Be carefull about the stones(probal). If you are not familiar you might fall in trouble. Now you can move forward. Carefull about the water level of sea. You might found after two hour you are almost one kilometer away from the beach. And the water level rises dangerously. You found allmost all stones are under water. Don’t feel you can’t come back. Use your head. Behind you all area have only 2-4 feet water. So swim slowly instead walk. Because you can’t see the stones under 4 feet. But you can swim easily. After few minutes you found you and your freinds who is frightened of travelling are confronting. Don’t forget to drink. I have to be drunken. Surely drunken. But not with alcoholic somthing. Drink coconut water. ha ha. Its really tasty and surely remove your thrusty. Everybody enjoy as he like. So you dont need to hear what other peoples(including me) says. Enjoy yourself. But i like to say : DONT MISS!!!

DONT MISS!!!

Start your plan right now. This is high time for you. Yes !!! Only for you. So don’t waste your time. Just start planning.



Hilsha fish Fry!! Greate and delisious dish !!
October 16, 2008, 2:37 am
Filed under: It's My Life | Tags:

It’s really surprising for me as well. Nothing for today’s lunch. So first i cook rice and then think…. what’s next. First i thought for egg fry which is really really easy and common to all then any other dishes. But i think something different ;) lets see how it works for me. Finally decide for hilsha fish fry. Very simple recepie known by me after call one of my friend. Here it is for you all:

first mix LOBON with fish
then mix HOLUD GURA, MORICH GURA, ZIRA GURA
take a fry pane and put some SOYABIN OIL there
make sure your burner is burned
Now right after 1 minute pur your fish in the frypane
make to and fro with the pieces of fish. ha ha ha
Hey!! 10 minutes over. So drop down.

That’s all. Let me take my food and i am not sure how tasty it is…… Because i might mix more SALT , GURA…. then it needed. However, let me take it’s taste. :)



Hello world in Code Igniter !!
October 16, 2008, 1:10 am
Filed under: Code Igniter

Welcome to code igniter. The easiest PHP framework of PHP(although it take more time to learn for me ;) ). Whatever its’ a new language or framework developer dont’ care if they able to run  successfully ”hello world”. So let’s try quick to run our hello world application using CI(Code Igniter).

Well first you need a fresh copy of codeigniter what you can downlaod from codeigniter site. For instance click here to donwlad a fresh copy of Code Igniter. click me

Huh!! You have a zip copy of CI. Please extract it and put it into your root (www/htcdocs) directory. Rename extracted folder as ci_power (for example) or whatever you like according to your project name.

Nice!! first try to run your application. GIve it a try http://localhost/ci_power or simply  http://localhost/ci_power/index.php

Okay!! You are watching Welcome to code igniter. Lets thing where from it came and what’s going under the hood? CI have some configuration files where from you can set which controller will run first. By default CI set to welcome(file named system/application/controller/welcome.php) controller. Moreover, welcome controller loads welcome view file located in system/application/views/welcome_message.php

hhhmmm Now let us think, where shall we put our simple PRINT command hello world? It can be placed either in view file or controller. It’s very easy solution. We like to create our own controller and put our world inside. Lets do that. For simplycity copy welcome.php and paste it as mystuff.php. Now open the file and change Welcome by Mystuff (keep in mind first letter must must must be in uppercase).

Excellent!! You are almost successful. Write a single line of code echo “hello world”; inside index() function. Yep. You are totally ready. But where is the world? Here it is: http://localhost/ci_power/mystuff/

hello world!!

Ah!!! You are now an expert of CI like me ;)  



Welcome to Code Igniter

Welcome to CodeIgniter

CodeIgniter is an Application Development Framework – a toolkit – for people who build web sites using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries. CodeIgniter lets you creatively focus on your project by minimizing the amount of code needed for a given task.

Please read the Introduction section of the User Guide to learn the broad concepts behind CodeIgniter, then read the Getting Started page.

Who is CodeIgniter For?
CodeIgniter is right for you if:

  • You want a framework with a small footprint.
  • You need exceptional performance.
  • You need broad compatibility with standard hosting accounts that run a variety of PHP versions and configurations.
  • You want a framework that requires nearly zero configuration.
  • You want a framework that does not require you to use the command line.
  • You want a framework that does not require you to adhere to restrictive coding rules.
  • You are not interested in large-scale monolithic libraries like PEAR.
  • You do not want to be forced to learn a templating language (although a template parser is optionally available if you desire one).
  • You eschew complexity, favoring simple solutions.
  • You need clear, thorough documentation
CodeIgniter Uses M-V-C
CodeIgniter uses the Model-View-Controller approach, which allows great separation between logic and presentation. This is particularly good for projects in which designers are working with your template files, as the code these file contain will be minimized. We describe MVC in more detail on its own page.

[Directly copy and paste from CI User guide because they know about code igniter better then me ;) ]



Shortest way to create your site by wordpress
October 15, 2008, 5:16 am
Filed under: CMS, video tutorial

Its really easy to create a small site using wordpress. Here is the step by step instructions how you can create your own/client’s medium site easily. Which means wordpress in your server. Moreover there are another way of getting your blog in wordpress server which really not our concern here. So lets start !!!

Step 1: First you have to download wordpress from here
Step 2: Now extract it and paste full folder(wordpress) into your document root(htdocs or www).
Step 3: Lets rename config file wp-config-sample.php by wp-config.php and set parameters hostname, database name, username. Keep in mind you have to create an empty database or a database should exist before configure wp-cofig.php.
Step 4: You are one step behind your site/blog. Browse your site by example www.shopno-dinga.com/wordpress Follow the instruction (mostly next next….)

Finally you have created your site. First thing is you have to change your password because wordpress provide you a massy one.

Before proceed further design changes or add contents into your site, lets think what will we do if wordpress release a new version? How to upgrade wordpress? It’s really easy to upgrade and detailed instruction are here

Well now we have a site / blog. First thing is always first. Let us thing what we need for our site. Yes it’s posts. Our post might (most cases) fall under a category. It mean we need category as well. What if we like to display a site’s link. To give you an idea, lets say we like to display blood bank from shopno-dinga. Easy to integrate from write tab.
Create a post? Go Write -> Posts
Create a category? Find out yourself Add New Category link below Write -> Posts
Create a link? Write -> link

These are the basics of wordpress and i know it’s not enough at all. Surely you want more detail. Here is an excellent video tutorial which cover wordpress introduction very nicely.

Only the point this video tutorial missed is how to play video from your site rather then using wordpress site. Here is a nice reference link where from you can easily configure your site to play video. Moreover
http://wordpress.org/extend/plugins/vipers-video-quicktags/

So enjoy your Blog / Site !!! Feel free to post your comments and question as well.



Simple registration system in php
October 7, 2008, 8:19 am
Filed under: Uncategorized
Lets create a registartion system. Three fields name, designation and blood group. our target is to make a registration page where use will submit their information and press submit button. Then they will directed into a display page with their inputed informations.
So first create a page registration.php. First create a form. To create a form lets have an introduce of html controls
1. form: <form action=”target_page” name=”form_name”>
2. text: <input type=”text” name=”textbox_name”>
3. combo: drop down means LIST/MENU


How to start PHP
October 7, 2008, 8:18 am
Filed under: LAMP | Tags: , , ,

Before start php you need some back understanding of web technology. How web sites are developed?

Web site consist of three parts. We need to understand clearly what these are and how it works. First of all you need a server called web server. Apache is a server of linux where you actually put your files. Secondly you need to choose a scripting language. Without any scripting language you site can’t be dynamic. We choose PHP as web language. Finally to handle operations of data you need a database. Mysql is best suited with PHP and Apache.

LAMP: Stands for Linux, Apache, Mysql and PHP. So we can easily understands that, PHP is best suited in Linux server and this is the reason why everybody chooce Linux server for hosting. In contrast, most of we are using windows. Moreover, configure LAMP is not so easy for everyone. So what’s the solution? There are a number of integrated tools which are simple to install and configure automatically. XAMP is a very good one. WAMP is another one. You can download both for free from the web. Download XAMP/WAMP anyone  you like and compatible with your OS. Once XAMP/WAMP download and installed you are ready for to code with PHP, MySql and Apache.

For instance lets download and install XAMP. Then goto c://xamp/htdocs/ this is called root/document root. Lets create our first project named practice

create a folder c://xamp/htdocs/practice named practice.
now create a file named hello_world.php inside practice folder. i.e c://xamp/htdocs/practice/hello_world.php
Web consist of HTML/XHTML , Scripting language(PHP, C# dot net, JSP, Cold Fusio etc), Javascript and Database.
PHP code must contain a beginning and ending tag.
Short tag: <? …… ?>
Full tag: <?php …… ?>
Paste following code into hello_world.php file
<?php
echo “hello world”;
?>
How to run your script/site? Open a new browser window(Mozilla firefox or Internet explorer or Google Chrome) and paste the following url into your address bar.
where practice = project name
hello_world.php = file name.


Send Mail From Local Machine (Configuration)
October 5, 2008, 9:32 pm
Filed under: LAMP | Tags: , , ,

Many developer today like to test php mail script from localhost. Dislike to upload script in server for test. Moreover, like to finalize everything from localhost/own development platform. Furthermore need to configure your php.ini file what send mail using local SMTP.
A number of php.ini files are there in PHP, MySql and Apache. Which one you have to configure? Definitely not everyone. Mail as well as SMTP are very closely and intimately related with apache (web server). So you have to configure php.ini under apache\bin\php.ini. Just follow the following instructions: Change the configuration of apache\bin\php.ini file accordingly:

Default: ;
SMTP = localhost
Change it To : SMTP = “mail.gmail.com”
Effects/Reason for Change: Give outgoing mail address

Default: ;
sendmail_from = me@example.com
Change it To : sendmail_from = aminulsumon@gmail.com
Effects/Reason for Change: Default mail address where from mails are being sent

Default: max_execution_time = 30
Change it To : max_execution_time = 90
Effects/Reason for Change: Sometimes this execution takes time more then 30 sec.

Don’t forget to remove the beginning semicolon (;) each line which you have changed. Semicolon means comments here.

Now use mail() function to send an Email from localhost.

Test Script:-

$MailTo=”aminulsumon@gmail.com”;
$MailFrom=”Sender Aminul”;
$MailFromEMail=”info@gmail.com”;
$Subject=”Test mail from Localhost”;

$MailBody=”Message: Testing Mail from Localhost You can write here .”;

$Headers = ‘MIME-Version: 1.0′ . “\r\n”;
$Headers .= ‘Content-type: text/html; charset=iso-8859-1′ . “\r\n”;
$Headers .= “From:”.$MailFrom.”\r\n”;

if(mail($MailTo,$Subject,$MailBody,$Headers))
echo “Mail sent Successfully.”;
else
die(“Sorry! The mail not sent successfully.”);

Hope you are able to send email from your local pc by the help of internet connection :)



Validate email address in PHP

Validate your email address by regular expression in PHP. Tiny but useful function and easy to extend.

function EmailAddressValidator($Email)
{
if(eregi(“^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$”, $Email))
return true;
else
return false;
}