Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Wednesday, October 2, 2013

Why a PHP Framework is a must when developing websites

Since the past few years, PHP Frameworks have found their way into a web developer’s must-have frameworks for efficient web development. With the recent developments in technology and its constantly evolving nature, it is important that web developers make immense use of this Framework for maximum benefits. Besides, most of the well known web development companies tend to hire web developers who boast of intensive knowledge when it comes to PHP Frameworks. It organises your work and at the same time ensures that your final website runs smoothly and without any hassles. Furthermore, the organisation of the codes leads to a tremendous drop in errors and therefore, it makes web development an enjoyable experience. There is a plethora of PHP Frameworks that you can work with. Some of them include CodeIgniter, CakePHP, ZEND and the likes. Given below are some excellent benefits of using a PHP Framework for your web development process.


Monday, May 13, 2013

Using Custom PHP Codes on Magento

In the process of web development, PHP web application has a vital role. PHP is widely popular as a script in the web programming language. Due to its exclusive characteristics integrated with C, Pearl and Java languages, this has become very popular in ecommerce website development.


Monday, September 19, 2011

Email Address Confirmation PHP Tutorial

If you want that users sign up to join your website you may want to verify their email address by sending confirmation link to their email address. You'll learn how to do this in this tutorial.

Monday, August 15, 2011

Image of the Day PHP Tutorial

In this tutorial shows you how to display image of the day. You can adapt this script to display quote of the day, knowledge of the day or something else you want. You don't have to change image everyday just change images once a week. 

















 

What to do?


1. Find what today is? using date function and keep answer in variable name "$today".
2. Compare $today with name of the day.
3. Display "Today is " ... " and display image of the day.
4. test it. Try to change your machine date and see the result!


$today=date(l); // Find what today is? using date function


{code type=codetype}

// If today is Monday displays message "Today is Monday" and displays image1.gif
if($today==Monday){// Compare $today with name of the day.
echo "Today is Monday";
echo "<BR>"; // Line break
echo "<img src='images/image1.gif'>"; // images keep in forder "images"
}


{/code}

-----------------------------------------------------------------------------------------------------------------


If You want to show 1 month 31 images replace with this code

{code type=codetype}
$today=date(d); // display date "01", "02", "03"..."15", "16" ....
if($today==01){ .......

elseif($today==15){ .......


until $today==31


{/code}

|---|--------------------- code --------------------|---|


{code type=codetype}

<?
$today=date(l);// Find what today is? using date function


if($today==Monday){
echo "Today is Monday";
echo "<BR>";
echo "<img src='images/image1.gif'>";
}

elseif($today==Tuesday){
echo "Today is Tuesday";
echo "<BR>";
echo "<img src='images/image2.gif'>";
}

elseif($today==Wednesday){
echo "Today is Wednesday";
echo "<BR>";
echo "<img src='images/image3.gif'>";
}

elseif($today==Thursday){
echo "Today is Thursday";
echo "<BR>";
echo "<img src='images/image4.gif'>";
}

elseif($today==Friday){
echo "Today is Friday";
echo "<BR>";
echo "<img src='images/image5.gif'>";
}

elseif($today==Saturday){
echo "Today is Saturday";
echo "<BR>";
echo "<img src='images/image6.gif'>";
}

elseif($today==Sunday){
echo "Today is Sunday";
echo "<BR>";
echo "<img src='images/image7.gif'>";
}

?>


{/code}

Wednesday, June 8, 2011

Limit Displayed Characters From Your Text

This php tutorial will help you that how will apply limit displaying characters form you message and not cut out your word.

Wednesday, June 1, 2011

Upload and Rename File PHP Tutorial

In this tutorial you will learn that how to rename file when upload file to server to prevent new file overwrite an old file that exists in you server.

Tuesday, May 10, 2011

PHP Encryptions Tutorial

In this tutorial I'm going to teach you how to use some of the different PHP Encryptions available to us. There are quite a few ways to encrypt or change data using PHP so that the data can be inaccessible or very hard to decipher. I'll be showing you how to set up a very simple encryption process through a form so that you'll understand how PHP encryptions work.



The first step is to set up a form that will allow the user to enter some data. So create a new HTML file and within the body we'll enter:

 
<form action="query.php" method="post">                   

Enter a string: <input type="text" name="addc" />

<input type="submit" value="enter" />

</form>

 

The <form> creates an action towards "query.php"; this is where we'll be handling our PHP encryptions. It also uses the method POST, because the information sent to a PHP file using this method becomes invisible through the process so  other users can not see the data. Then we write what we'll want the user to see, so we write "Enter a string:" followed by an <input type> of text with a name of "addc". The "addc" name is important to remember because this is what we'll be using in our PHP file later to access what the user entered.
Then we close everything off with an <input type> of submit, which basically creates an enter button for the user to click and send their information to the PHP file.



So now that the HTML form is complete, we'll move on to the PHP file that will contain the encryption process for the data.

First create a new PHP file and name is "query.php" PHP scripts are always written between <?php and ?> The first  thing we'll have to do is access what the user entered, and we'll do this by writing:






$str = strip_tags($_POST["addc"]);







In PHP, variables are written using a dollar sign and a word, so in this case we'll use $str as our variable. _POST["addc"] is how we access what the user entered in the form. Before when we created our form we had used the method POST, and this allows us to get any information from the form, so in this case we want what the user actually entered into the text box. We gave the text box a name of "addc", so $_POST["addc"] gets whatever is entered in the textbox from the form in the HTML file. Then we enclose this within strip_tags() to strip any HTML or PHP tags the user may have entered. This is usually safe practice for safety and protection from people trying to access hidden information in your forms. Now let's get on to the different encryptions.

After the user hits submit, and they're taken to the "query.php" file, we'll still want them to see what they had entered in their form. So after we declare the variable above, the next thing we'll write is: (P.S. anything between /* */ is just a comment, so you could keep it in your PHP file if you want as commentary to help you better understand)

echo "You entered: " . $str; /* echo is how we output strings in PHP. The "." is a concatenation operator and it's used to put two string values together. */

echo "md5 Hash Form: " . md5($str); /* md5() is how we change our data into an md5 hash. We declared what the user entered by the variable $str, so all we do is write
md5($str) */


echo "SHA1 Algorithm: " . sha1($str); /* This encryption is used the same way as md5(), you just write sha1($str) and it will create a SHA1 hash of the string */

echo "String Shuffle Function: " . str_shuffle($str); /* str_shuffle() just shuffles around the data so it looks completely random */

echo "uuEncode Algorithm: " . convert_uuencode($str); /* this converts the string using the uuEncode Algorithm */

echo "ROT13 Encyrption: " . str_rot13($str); /* converts the data using a ROT13 function */

echo "How Many Words Counted: " . str_word_count($str); /* this function simply just tells the user how many words were entered in the text box in the form */

 
Then when all of the different encryption functions are written out, write this piece of code between each of them to give some spacing.  echo "<br /> <br />"; 

Some explanations on each of the encryptions:

The MD5 encryption is a widely used cryptographic hash function with a 128-bit hash value. MD5 is also very useful at checking the integrity of files. A few years after the creation of MD5, it was found to be less suitable for several applications and security measures. In recent years, many flaws were found with MD5 dealing with SSL certificates and
checksums of files.

The SHA1 encryption (Secure Hash Algorithm) is a cryptographic hash function designed by the National Security Agency. SHA1 is widely used and employed in several security
applications and protocols.

The uuEncode Algorithm works by converting all the data into a text file with only printable characters. uuEncode was very useful in the earlier days because it addressed the problem of sending binary data file through email.

The ROT13 encryption works by shifting every letter 13 places in the alphabet. It's a very simple encryption method that only works on letters, numeric and non-alphabetical characters will remain as they are entered.

You can check out an example of PHP encryptions here!

Monday, April 4, 2011

PHP Counter Script Tutorial

Creates your own counter script using a basic knowledge of php + mysql script and keeps your visitors number to database for analysis.

Thursday, March 17, 2011

Contact Form Tutorial Using Html and PHP

We will teach you in this tutorial that how to create simple contact form. This form you can use anywhere you want. We will show you that how to contact your email with contact form so that when the user wants to send you a message. It's very easy. Let's start tutorial. For this mailing system server side language is must with that we can not send and receive email. All the information goes through the server, so we will be using PHP as server side language.

Wednesday, March 9, 2011

Alternating Table Row Colors

Many of website use this script to alternate their table row color that selected from mysql database, very useful and cool.

Sunday, February 20, 2011

PHP Limit Upload File Size

Apply limit on file size at loading time using this tutorial or script. This upload form can limit file size.

Wednesday, January 19, 2011

PHP Multiple Files Upload

You can upload multiple files with one time submittion. Array is a big role in this tutorial, let's see the scripts.

Friday, December 17, 2010

Get Width and Height of an Image in PHP

PHP provides a function to get the width and height of an image. "getimagesize()" This function will determine the size of image file and also will get size of flash file(swf).

Tuesday, December 14, 2010

Greatest Resources of Tutorials Submission and Promotion

Tutorial is a method of transferring knowledge and it can be used as a part of learning. Most of people are spreading their knowledge via tutorials and there are a lot of tutorials in different forms. Specially thousands of websites are playing roll to spread these tutorials in a great way. Every designer or writer after completion of his/her tutorial must want to share with all web community and want traffic and popularity. Today in this article we are listing some sites for tutorial writers who can submit their tutorials there and can get handsome traffic.

Sunday, November 21, 2010

Simple Ad Rotation PHP Tutorial

This is a very simple and easy ad rotation tutorial, you can set percentage to show the ads and you can adapt this script to rotate any thing. In this script (very easy script), we have 3 ads for rotation first ad we want it to display 70%, second ad we want to display 20% and the last one we want to display 10%

Sunday, October 17, 2010

120 Websites to Promote and Submit Your Tutorials and Design Articles

There are a lot of social bookmarking and voting sites to encourage your design tutorials, web tutorials, development tutorials and articles. And if you submit your tutorial or article on each of those sites regularly you can get a large reciprocation of new and frequent visitors in real impatient reading. You can get umteen unparalleled visitors on you tract or article daily using this method. Also if you use this method, you gift get really substantial backlinks which are favorable for SEO.

Wednesday, September 22, 2010

Encrypting Password Using md5() Function

This turorial will teach you that how to make your login system more secure. We will use md5(); function for this.

Friday, July 30, 2010

PHP Login Script Tutorial

Learn to create a simple login system with php + mysql script, this tutorial easy to follow, teach you step by step.

Monday, May 24, 2010

Simple PHP Contact Form Tutorial

When you need that user contact with you or send feedback to you via email then you have to need make a contact form. In this tutorial you will learn that how to create form with php script.

Sunday, April 25, 2010

PHP Upload Single File

This is a simple PHP uploading file tutorial. You can upload files on your server through this script.