In this post we have explained about how to generate strong password in PHP. Following function is very easy to generate strong password with alphanumeric and custom special characters too.



In this article we have explained about how to upload an image with resize using simple php script. Save image as your width and height.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>Upload Image File and Resized</title>
		<form enctype="multipart/form-data" action="" method="post">
			<input type="file" name="files" />
			<input type="submit" value="Upload File" name="upload"/>


In this  article we have explained about how to create custom Helper in Codeigniter. Helper is a group of functions but it is not a class.

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

if ( ! function_exists('sample_method'))
    function sample_method($var = '')
        return $var;


To avoid the illegal words in your content as you are using codeigniter provide word_censor functions.Here we are brief explain about this function. First you mention what are the words are you going to skip from the content. Those values are maintain your table.


CREATE TABLE `test`.`get_illegal_words` (`word_id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `illegal_word` VARCHAR(255) NOT NULL) ENGINE = InnoDB;


When you are integrating google maps for locations you may need to know their latitude and longitude values. In that time pass your address through for api request.It returns the values as json output. The values are stored into database. So next time you can search the location in table. If it is not found you can send api request and store it.Why we are store the values in database because to avoid of frequent usage this is free api even it has some limit of access. when we frequent request the server doesn’t respond immediately. So that’s why we store the values.

In php:

For example



$output= json_decode($geocode);

$lat = $output->results[0]->geometry->location->lat;
$long = $output->results[0]->geometry->location->lng;


CREATE TABLE `test`.`geocode` (`location_id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `city_name` VARCHAR(255) NOT NULL, `latitude` VARCHAR(255) NOT NULL, `longitude` VARCHAR(255) NOT NULL, `status` TINYINT(2) NOT NULL DEFAULT '1' COMMENT '1-Active,0-Deactive') ENGINE = InnoDB;


Subscribe Our Channel

Email Subscription
Watch Tutorials
Copyright © 2015 - 2022 PHPEXPERTISE.COM