Home » Archive

Articles in the PHP Category

PHP, Tech Corner »

[11 Jun 2009 | 2 Comments | Posted By:Vivek]

PHP provides you with a great deal of tools for creating,reading and editing files.
This section deals with the various types of manipulations possible using PHP.
For any operations to be performed,we need a file.Lets first create a file.
In PHP,a file is created using the fopen() function.It may seem odd,but i can clarify that.
When fopen() is called,it will check whether a filename(that was given as argument to fopen()) exists or not.If the file does not exist,it will create the file.
fopen() takes two arguments,the name of the file and the access mode(whether you …

Read the full Post »

PHP, Tech Corner »

[25 May 2009 | No Comment | Posted By:Vivek]

This post covers the basics in setting cookies and sessions in PHP.A Cookie is basically a message given by the web server to the web browser.This message is stored in a text file and the message is sent back to the server every time the browser requests a page from the web server.The main purpose is to identify the users.The difference between a session and a cookie is that a cookie is set in the user’s browser while the session is stored on the web server for later use.The web server cannot retrieve your information because the HTTP address does not maintain state.The scope of the session is between the time you enter the website and the time you leave the website.

Read the full Post »

PHP, Tech Corner »

[25 May 2009 | No Comment | Posted By:Vivek]

This post covers the basics in creating user defined functions and classes in PHP.Like most other programming languages, PHP also offers you a wave of in built functions.But here lwe will see how to create user defined functions in PHP ansd also learn the basic of Object oriented concepts in PHP.You should make use of the classes and functions to make your code more readable and ordered.The various object oriented concepts like inheritance etc can be used to enhance the functionlity of your application by the use of classes.

Read the full Post »

PHP, Tech Corner »

[2 May 2009 | No Comment | Posted By:Vivek]

PHP provides you with the crypt() function for one way encryption of data.
For example,if you have a registration form to enter the password and suppose we require it to be secure,that is,to be saved in the database in the encrypted manner,we can use this function.
Basic syntax of the crypt() function is
crypt(your string,salt)
The salt parameter influences how the encryption will work
Mainly 4 types of salts are supported.
Two DES encryption salts
CRYPT_STD_DES(2 character salt)
CRYPT_EXT_DES(9 character salt)
and
CRYPT_MD5(12 character salt,starts with $1$)
CRYPT_BLOWFISH (16 character salt,starts with$2$ or $2a$)
Lets see the working of the crypt() in …

Read the full Post »

PHP, Tech Corner »

[1 May 2009 | No Comment | Posted By:Vivek]

PHP stands for Hypertext Preprocessor.PHP is a powerful server side scripting language for creating dynamic and interactive websites.The definite advantage of PHP over ASP.NET is that it free and can easily be embedded in html.PHP supports many databases(MY SQL,Oracle to name a few) and is cross platform(works under different platforms).
What you need:
In order to code in PHP you will need to install

PHP
MySQL database
Apache server(commonly used web server) or

You can install the WAMP server,which is a package that includes PHP,Apache and the MySQL database.
Follow this link to know how to install …

Read the full Post »