Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

How to use feeds module in drupal to import feeds from other websites?

I want to import blogs and articles from other sites into my drupal website. I also want to import youtube videos in different content type.

Using database session handling in Code PHP

PHP is one of the scripting language. In which session handling is one of the key thing mostly using in web application. Suppose you build a website and allow to login everyone in website, You need to track user every step until they log out o...

How to list all child pages of current parent page in drupal 7?

Suppose I have parent pages A1 and B1. A1 has child pages A1.1, A1.2,A1.3 and B1 has child pages B1.1, B1.2. I want to list all the respective child pages on A1 and B1. In every child page I have an image and a title. These 2 information needs ...

How to Get Current Latitude and Longitude Location in Drupal 7

I need to get my current location Latitude and Longitude in Drupal7. Which module should I use and what will be the process of using that module?

Inheritance in PHP

Hello Readers , Here's the explanation of concept of Inheritance in PHP. What is inheritance? Inheritance is nothing but a design principle in oop. By implementing inheritance we can inherit(or get) all properties and methods of one cla...

PHP Copy Files

How to open and read PHP files have been discussed in previous blog: http://findnerd.com/list/view/How-to-open-and-read-files-with-PHP/3157/ Now,we will discuss about copying a php file. In php,we can Copy files from source to destination...

How to upload two separate files in php

Hi if you want to upload two separate files from one single form to be uploaded and with a for simplest code Look at mine code. The form will have two separate input files but you need to name them common, ex 'files[]' I'm using 'upload[]' in ...

File Handling with JFile component in Joomla

JFile is the default library class for handling files upload, copy & delete functions. This can also be used to get the file name, extension and renaming a file while uploading. Following are the details of functions available that can...

How to compare PHP Variables and Arrays with null or empty values

Sometimes it is a bit confusing for developer to select right compare statement to check variables or arrays as there are lots of compare functions like "isset()", "!" operator, "is_null()", "empty()" etc. So we can use a straight forward appr...

How to open and read files with PHP

Before reading information from any file,we have to open the file for reading. This Blog will help you to find the code to read-open-close the file(s) on server we have created with PHP. Opening a file:fopen() This function enables t...

403 Error Unable to load the HTML Page

Hi, I have a issue in trying to access a page on my website When I try to open the html page it gives me an error 403 "You do not have permission to access/main/menu.html on this server." I have also changed the permission of the folder....

URL rewriting using .htaccess

Hi, I was trying to rewrite a URL in .htaccess file on particular range of id's from 40 to 900. But it is not working as it is supposed to be. Actually I want to redirect page if there is any Id from 40 to 190. But is also redirecting ids lik...

Indexed full text search in PHP-MySQL (PART - 2)

We already discussed Natural full text search in Indexed full text search in PHP-MySQL (PART - 1). Lets look into Boolean Full Text Search. In this we can use various operators to change the behavior of search. To specify a search to be b...

Indexed full text search in PHP-MySQL (PART - 1)

We need to write search queries every now and then in our projects. This is one of the most common tasks a PHP developer has to do. Most of the developers still use wildcard queries for this purpose which is very slow in searching records. Howeve...

Diffrence between unlink() and unset() in php

When we will use unlink() then this function will delete to file test.jpg from given path. PHP <?php unlink("image/test.jpg"); ?> When we will use unset() then this function will remove content initialized with the PHP variable...

How to resolve 'Creating default object from empty value' warning in CodeIgniter

Coder missed a very simple fix and general good practice that you should always initialize your object before you try to set a property. It is very simple fix for this is simply to add a new StdClass; call right before the error with the variable...

Diffrence between echo and print in PHP

Hello Readers! You might have heard these "echo" and "print" statement in PHP many times. So here we will understand now what is the exact difference of these two words. Both echo and print are used to output a statement. Below are the some...

Difference Between $a and $$a in PHP

$$a uses the value of the variable whose name is the value of $a. It means $$a is known as reference variable where as $a is normal variable. It allows you to have a variable of variable This program can create the variable name the same way i...

What is the difference between == and === in php

When comparing values in PHP for equality we can use either the == operator or the === operator. The == operator just checks to see if the left and right both values are equal. But, the === operator actually checks to see if the left and right va...

Stopping MySQL injection using Core PHP

What is SQL Injection? According to WIKIPEDIA: SQL injection is a code injection technique that exploits a security vulnerability occurring in the database layer of an application. A SQL injection attack exploits security vulner...

Swap two variables value without using third variable in php

Here is a method. How to swap two variables value without using third variable and temp variable. $a = 3; $b = 2; $a = $a + $b; // 3 + 2 = 5 $b = $a - $b; // 5 - 2 = 3 $a = $a - $b; // 5 - 3 = 2 print $a; print $b; Output: 2 3

How to configure database in Codeigniter

Hello Readers, In order to create any web application using Codeigniter framework or any other PHP framework we need to configure database . We have the database file inside application folder of a Codeigniter framework , inside application...

How to Install CodeIgniter in ubuntu

CodeIgniter can be installed in four easy steps on your ubuntu system: 1- Download CodeIgniter package and Unzip. Download link http://www.codeigniter.com/download 2-Upload the CodeIgniter folders and files to your server. Normally the inde...

How to included a timer on a web page

hello all, I want to include a timer on a web page which is designed for taking online test like on this website whose link is as followed http://www.indiabix.com/online-test/aptitude-test/random. Please suggest me how can I do that .

ACL architecture in Joomla 3.x

Hello Readers, Today we are going to discuss the details about Access Control Lists (ACL) of Joomla 3.x Access Control List (ACL) specifies which users or system processes are granted access to objects, as well as what operations are allow...

12 Reasons to Choose PHP For Developing Website in 2015

Simplicity As we all know that PHP is quite similar to languages like Pearl and C, and it is extremely easy-to-use and learn that becomes the most beneficial thing about this wonderful language for programming. Any person no matter from whi...

REST API in joomla 3.4 with SLIM Framework PART 2

Flowing on from REST API in joomla 3.4 with SLIM Framework PART 1 it's time to to use the real power of Slim Framework. In this second part of tutorial series , we will use SLIM Framework in Joomla way of style to create powerful API. As we le...

How to Use Mandrill SMTP in LARAVEL 4?

Using Mandrill SMTP in LARAVEL4 is easy to use by following below changes in cofig/mail.php return array( /* |-------------------------------------------------------------------------- | Mail Driver |---------------------...

How to use IN condition in find query in yii

Below code will help you to use IN condition in find query in yii- $conditionsArray=array(1,2,3); $criteria->addInCondition("userid", $conditionsArray); $postdetails = Post::model()->findAll($criteria);

How to import large .sql file to mysql via terminal

If you want to import large sql file to mysql via terminal, here are the steps: First go to terminal, for Linux (UBNTU) user can go directly by pressing Ctrl-Alt-t key. Now write down the following commands in Terminal. mysql -u <userna...

Creating Web Services with PHP and SOAP

What is SOAP?? SOAP stands for Simple Object Access Protocol. SOAP uses HTTP request for intraction between programs. Because of HTTP request is supported by all servers and browsers, that's why it is a best way to communicate between applicat...

Create Update, Delete and Insert Functions

Hello, Here I am writing the code to create update, insert and delete functions so that we can use it the same functions anywhere in the project. <?php // function to insert data function insert($table = "", $fieldsArray = array()) {...

Logger class in PHP

Hi This is a simple application logging class which you can use in your PHP project. It currently provides two methods, one for logging messages and another to log a dump with an optional message. I will add the streams support and stack tra...

How to optimize and repair all databases and tabels in mysql?

Optimization of database tables in mysql is a methodology which must be done frequently to make your database healthy. As per mysql manual, OPTIMIZE TABLE should be used if you have deleted a large part of a table or if you have made ...

How to import csv file into mysql database in php

To Import csv file into mysql database using php script follow the below code: For example: I have a .csv file data with this formate:- (1) Indresh Singh, indresh@abc.com, 12345 (2) mukul kant, mukul.kant@abc.com, 12345 To insert ...

How to Make Database Association on Selected Pages In Cakephp

If you want to make Database Association on Selected Pages In Cakephp follow the below steps, Below code can set association where it require and you can also reduce unnecessary queries firing to database. Make function in your model and ...

Install Image Magick on linux CentOS

We can easily install image magick on linux centos by following the below given steps : $ yum install make $ yum install gcc $ yum install php php-fpm php-devel php-pear $ yum install ImageMagick ImageMagick-devel $ pecl install imagick $...

Paypal: Create Recurring Payments Profile Working Code

This code use to deduct amount automatically from paypal buyers account. It is something like advance payment mode. If user agree with automatically deduction when he / she paying through paypal then amount will deduct according to billing period...

Remove .php, .html,.htm extension from website url.

Hello , I am sharing here how you can remove .php extension from Url of your website. here are the following steps:- Create a .htaccess file in project directory. Suppose you have to remove the .php extension from a PHP file for example ...

SMTP Configuration of server

If you are using some other server like godaddy or some other server for that you need to put the settings of that particular server in its setting. I am sharing the settings for godaddy server. $mail = new PHPMailer(); $mail->IsSM...

How to download file using PHP script

We use this script to download a file from a given define file path location In this script we are using two variable: 1:) $fileName // for file name with path. 2:)$title //for file name changed in you given title name. <?...

How to integrate MobBill Mobile payments for Video, Ringtones etc

Hi All, Here I am sharing how to implement MobBill Mobile payments, for this follow the steps below :- Step 1 -> You need to login into the link http://merchant.mobbill.com/insight/login/auth and create your account. Step 2 -> Now...

Create custom component in Joomla 1.5

Sometimes, when we are working on CMS like Joomla, Drupal etc, we have such requirements for which we need to build our own component. On that component, we can add our logics for development. Here are some basic steps to create you own Joomla...

Steps to create custom plugin in Joomla 1.5

There are some core plugins availabe in Joomla project for e.g. System, User, Search, authentication, content etc. Plugins provide a function which are associated with specific event trigger. In one of my project, I had a requirement to add pa...

Creating CSV from HTML using jQuery

In one of the project, I needed to create the CSV file from the html using jQuery. To make this possible, I created the below code to convert the html into csv file using jQuery. <script type="text/javascript" src="jquery.min.js"><...

How to Create Simple Html File Through PHP Script

This tutorial show's how we can create a simple Html file through PHP script. if($filename == ''){ $filename = 'demo.html'; $writefile = ($filename , 'w'); $content = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict...

How to Make a new CSV File Through PHP Script.

This tutorial show's how to create a new CSV file through PHP script. This script is more helpful for php developer to create a new CSV file in array formate. function functionname (parameter) { if (($handle = fopen("$data", "r")) !== ...

Code to validate ISBN10 or ISBN13

We seldom need a code to check whether the ISBN of book we are trying to search is a valid ISBN or not. So as to validate a provided ISBN we can use the below code for ISBN10 and ISBN13 respectively : Code for checking validity of ISBN10 : ...

Unexpected bheaviour of in_array in PHP

We have an associative array where its values are all Boolean and if we search for a string, we got true. Lets see an example. <?php $array = array( 'count' => 1, 'references' => 0, 'ghosts' => 1 ); var&#95;dump...

Laravel Framework

Recently Laravel framework has been launched in the market as I am not familiar with it, because still I have not worked on this framework but it seems to be one of the best MVC framework, below link provides you an average of mostly used/popular...
1 16
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: