Featured
-
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Best 5 Lightweight PHP Frameworks for REST APIs Development
Are you ready to develop the Rest AP
by ankur.kumar -
PHP: Full-Stack Framework vs Micro Framework
A web framework can be described as a software fra
by ankit.bhatia -
How to get facebook profile picture by Facebook App
If you would like to get your profile picture in f
by vivek.rastogi -
Creating RESTful API in cakephp
This tutorial will help you to learn how to create
by pushpendra.rawat
Tags
How to create an "Admin Panel" for a project in cakephp ?
We can use a plugin, that will help us to create an admin panel in a very short span of time.
For cakephp framework there is a plugin named as BrowniePHP.
Prerequisite:
One should know how to create web sites and web applications usi...
Protecting your CakePhp application against Sql injection
SQL injection is a technique where malicious users can inject the SQL commands /queries into an SQL statement, resulting in false input of the web page and the security of a web application.
Eventually CakePhp already protects the application...
How to ACL to your component in Joomla 3
Today we will explore one of the greatest feature of Joomla! that comes built-in with core Joomla. This in-built ACL feature gives you the ability to control to your application exactly what the user can see and what User can do.
Before dive i...
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...
How to save session in Mysql database using CakePhp?
Sometimes the web infrastructure do not share session data with each other. For this reason, sessions may be lost between requests.
Using MySQL effectively ripps out this problem, as all session data is directed to and from the database server ...
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...
Save Session in databse in CakePHP
In CakePHP you can store the Sessions in the database , So lets try to implement this :
Because you are storing the session in databse so first you need to create a table in DB so that you can store the session
CREATE TABLE IF NOT EXISTS `c...
Send email template in mandrill using dynamic key in Laravel5
If you want to send mandrill template not integrated with Mailchimp and by using Secret Key dynamically follow given steps
Use https://packagist.org/packages/mandrill/mandrill package
Run composer update
In your controller
use Mandri...
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 save session in databse using php?
Saving session in database is best practice for website security. so if we want more security then we need to save session in database.
Here are few steps to save session in database
step 1--> Create a table name as sessionsdata
step 2...
Using database for session handling in codeignitor
codeIgnitor will usually make everything work out of the box. However, Sessions are a very sensitive component of any application. Its important for you to understand that once initialized, the Session class runs automatically. There is nothing y...
How to take Backup of MYSQL Database file and upload it on Dropbox Account?
Hello,
I am sharing here how we can take backup of our Project mysql database file and upload it in our Dropbox Account. Advantage using this feature is we can store our database backup in our Dropbox account daily. We can set our script as a...
Magento shipping module configuration
To create new magento shipping module one need to know all the useful functions to be used inside the shipping method class to put in various configuration options.
When looking for available shipping methods, Magneto first gathers all availab...
Structural and content blocks in Magento
Magento is the top eCommerce framework. It offers great flexibility with file structure. Magento uses elements like observer, block, blocks, template, layout, skins, theme and interface.
A Magento page is a combination of Structural Block and ...
Custom Post Type Templates in Wordpress
In WordPress theme you can set custom templates for custom post types ,A custom template used to display of single posts belonging to a custom post type .
suppose you have created a custom posts name books,
add_action( 'init', 'create_post...
Custom Post in Wordpress
In wordpress you can create custom posts , Suppose in your WP site you want to create a Movie list then you can use this custom post type ,
To create custom posts type you have to first invoke register_post_type() through init action,
Lets...
How to get latitude & longitude via address using google geocode api?
Hello geeks, today i am going to explain about how to get lat & long of a given address using Google geocode api.
To convert an address into latitude and longitude is known as geocoding
Here you go:
// set geocoding url
$geocoding_u...
Push Notification - Android using GCM
This post will help you to send push notification to Android devices using server side scripting language called php.
click below Link to get Google cloud messaging api-
https://console.developers.google.com/project
Here is a code to send...
How to add an attribute for product in magento
Whats an attribute in Magento?
An attribute in Magento is defined as any property of a product. This includes product id, product title, sku, images, description everything! and you can add as many attributes as you need.
How to create an a...
Display featured product in magento
To show a featured product first we need to set products as featured . To do so we need to create the product attribute named as "featured".
Create an attribute-
1) Create a new attribute by going to Catalog > Attributes > Manage Attr...
Magento layout files and structure
What Are Layout Files?
As the denomination suggests, layout files are subsidiary in rendering front pages of Magento. Layout files are XML files that reside in app > design > frontend > your interface > your theme > layout.
Her...
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);
Push Notification - iPhone
This post will help you to send push notification to iPhone devices using server side scripting language called php.
Here are code to send push notification
/**
* Apple Push Notification Services (APNS)
*
* @param array ...
Common function used in WP theme
Some useful WP function for developing themes
have_posts();
This function check whether the current WordPress query has any results. This is a Boolean function, and returns either TRUE or FALSE.
syntax is :
if ( have_posts() ) :
...
Print Last Executed Mysql Query in Codelgniter
Hi,
If you are stuck with printing last executed msql query in codelgniter so with the help of below code, you can print or You can view your last executed mysql query in Codelgniter.
echo $this->db->last_query();
How to Send AJAX Request Using YAHOO User Interface Library?
If you want to send ajax request using yahoo user interface library, for that follow the below mentioned code step by step.
First Import Yahoo libraries in page you want to access them
Include namespace echo (reference path)
YAHOO.namespac...
Remove current label or input field in jquery
Hello,
I am writing the code through which we can remove particular label or input field on the click of delete button.It is mostly used when we have three or more forms user interface in our page.
To execute the piece of code please add j...
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()) {...
Solr integration in CakePHP with solarium client
Hi,
Before using Solr in CakePHP, we need to decide which Solr client we are going to use. After doing lots of search I finalized Solarium which is up to date and easy to use.
For Installing Solr, I used following link:
http://www.shayande...
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...
REST API in joomla 3.4 with SLIM Framework PART 1
Say Hello to Slim World
Today I am going to reveal first part of building REST API in Joomla 3.4 with SLIM Framework. To get started with Slim, here is small introduction about slim framework that is written on SLIM official website.
"Slim is...
Blank screen issue in joomla 1.0
The blank screen in joomla 1.0 powered sites can be resolved by the following ways:
You have to edit the two pages
Step 1:
In /includes/Cache/Lite/Function.php
Replace
$arguments = func_get_args();
to
$argume...
Enable CakePHP with multilingual support and create PO file using cakephp-script
Enabling multilingual support and creating po locale files are very easy with cakephp-script.
We can use cakephp console framework for this.
There are few simple steps to create po files first:
1: Navigate to you app folder: cd /path/to/cake...
Problem with responsive Google AdSense ads
If you are planning to add responsive Google ads then we need to take care of the size of the parent container of the Ads. This is compulsory that size should be in percentage(%).
I tried to use this setting and set container's size as 50% in a ...
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 ...
If you want to remove index.php from url in Codeignitor
If you want to remove index.php file path form url in codeignitor then please follow below steps
create .htaccess file in your root folder and place this code there
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
Rewr...
CakePHP Form Validation Using Ajax
As we know cakephp have not any kind of in-build form validater to check requried fields. So by ajax we can check form validation.
The flow is that first of all we have to submit the form via ajax to controller and check the validation throw c...
If cakephp not cofigured properly
If Cakephp throwing an error:- URL rewriting is not properly configured on your server.
To fix this issue follow below steps:
Check .htaccess files in root directory
Let say you have directory with the name of myproject
then check ....
How to resolve social media login hybridauth error in cakephp
If you facing an error to login through hybridauth and throwing this error(You cannot access this page directly) then you can follow below steps to resolve it.
Please check you session id by php predefined function
session_id();
If ...
Only Numeric value with dot can be enter in text box
If you need only float or numeric value to be enter in the text box. You can use the below code.
<input name="score" id="score" type="text">
<script>
$(document).ready(function() {
$("#score").keydown(function(event) {
...
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 ...
How to get Cakephp All Fields From Database on live server / localhost
If Cakephp not getting newly added columns from database on live server / localhost to solve this issue use below steps:
Go to app / config.php the edit file and set
Configure::write('debug',0);
to
Configure::...
Fixing orientation when sending images & videos from Iphone.
Hi all, for fixing the rotation problem when image/video is taken from Iphone, we can have following cases:
When creating a thumbnail from an image and then getting its orientation correct, we can use shell command like this:
shell_exec("co...
Create a Wordpress Plugin
Hi there ,
Here I am showing with the example how you can develop your custom plugin in wordpress,To develop a Plugin in Wordpress, you should know some basics concepts of Wordpress files and folders.
So now I will create a plugin which wi...
Find latitude and longitude of a place.
This code will help in finding the latitude and longitude of any place using curl and php.
Step 1: Finding the latitude and longitude for first place.
<?php
ini_set('error_reporting', E_STRICT|E_ALL);
i...
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.
<?...