PHP Frameworks

Eclipse | Enable Php Support for extra features

Author - Parminder Kaur
|
0 Comments
|

In Eclipse (Luna Service Release 2 (4.4.2), jump to method definition is available for Java and other languages. But sometimes, it gets disabled for PHP.

For example ,if eclipse crashes. So to enable this, first you have to select the Php Perspective in Eclipse:

– Right Click on your Read more…

Capture Screenshot of a Webpage from its URL in PHP

Author - Gopi
|
0 Comments
|

Generally, Google PageSpeed Insights API is used to measure the performance of a web page but you can also use Google PageSpeed Insights API to get a screenshot of the website from URL. In this post, we will show you how to capture a screenshot of the webpage using its Read more…

Configure PHPMYADMIN to connect to different servers

Author - Ashish

Here are the steps to set up PHPMYADMIN to connect to database servers located at different ip addresses:

1. Open config.inc.php located in C:\xampp\phpMyAdmin directory in windows and located in /etc/phpmyadmin directory in Ubuntu.

2. Add the below written code at the end of the Read more…

CakePHP | Date format translation using internationalization

Author - Parminder Kaur
|
0 Comments
|

In Cakephp, To translate the application language into another, we use internationalization and localization. To display the correct translated date string on change of locale, we need to use right classes.

use Cake\I18n\I18n;
use Cake\I18n\Time;

I18n::Locale(‘es’’); // es locale is for Spanish
$date = ‘2017-08 Read more…

SQL Transaction in Cakephp 3

Author - Parminder Kaur
|
0 Comments
|

SQL transaction in Cakephp 3 is a series of statements working in a logical order to handle database errors and ensure data integrity. There are four main methods being used in Sql transaction in Cakephp 3.

1. Initialize the statement using begin() method.

2. Execute the statement which Read more…

How to integrate CyberSource payment gateway with CakePHP 2.*

Author - Webner
|
0 Comments
|

Steps to integrate CyberSource payment gateway with CakePHP 2.*:

1. Download zip file of CyberSource library from “https://github.com/chrismeller/cybersource”.

2. Extract cybersource-master folder into cakephp vendors folder.

3. Create tests/config.php for test transaction with code and add credentials like below:

<?phpRead more…

CakePHP | How to change Epoch timestamp (unix timestamp) timezone in cakephp find query

Author - Kailash
|
0 Comments
|

Suppose we have a table cake_test with a column named modified that contains epoch values.

CakePHP code:
$options = array (
‘fields’ => array (
“modified”,
“to_timestamp(modified) as New__original”,
“to_timestamp(modified) AT TIME ZONE ‘America/Denver’ as New__converted”
)
);
$result = $this->CakeTest->find ( ‘all’, $options );

In the above query we have Read more…

CakePHP | Call to a member function schema() on a non-object

Author - Manju Kashyap
|
0 Comments
|


Error:
Call to a member function schema() on a non-object
File: /home/user/git/!defaultRepo!/Appname/lib/Cake/Model/Datasource/Database/Postgres.php

Line: 404

Description: I was trying to execute the following cake query to fetch the records:
$records = $this->find ( ‘all’, array Read more…

Heroku | Heroku cron jobs and CakePHP code

Author - Tanuj
|
0 Comments
|

Use Heroku cron jobs to run CakePHP code at fixed intervals of time.
Cron is a time-based scheduler used to run commands periodically at fixed intervals. Cron means time. It is used for scheduling repetitive tasks. In order to use it in Heroku, you just need to install the Read more…

How to add font-awesome progress icon in textbox for autocomplete Jquery-UI plugin

Author - Ishpreet Kaur
|
0 Comments
|

First of all, we should know what features are provided by jquery-ui plugin. To know about details, please see link,

http://jqueryui.com/demos/

Jquery UI plugin can be downloaded from the link

http://jqueryui.com/download/

Now, today, we will discuss about Autocomplete feature of jquery-ui plugin Read more…

Using concatenate, cases, substring in CakePHP 2

Author - Kailash
|
0 Comments
|

How to use concatenate, cases, substring in CakePHP 2.* find query.

Suppose given records are:

Problem: Display user details in one column and the first character of user role in front of the user full name. Also suppose in case of superadmin role as well we want to display (a Read more…

Uploading files on Amazon AWS S3 server using PHP

Author - Richa
|
0 Comments
|

Before uploading any document to Amazon AWS S3 server, make sure that user has to write access on the bucket where files will be saved else it will throw ‘Access denied’ error. Apart from the write permissions, access keys are also required in the code which we get while creating Read more…

QuickBooks Integration | Important Quickbooks Webconnector Facts

Author - Webner
|
0 Comments
|

Question: Can we add custom functions in quickbook?

Answer: Yes, In quickbook.php file we need to add Constants to make custom function and we can add as many as we want. After defining these constant we can map these in our web service.

For Example:

Suppose we Read more…

How to Disable CSRF token in Laravel Application

Author - Mamta
|
0 Comments
|

CSRF stands for cross-site request forgery. CSRF token is basically used for security purpose in Laravel forms. To understand how it works read here: https://laravel.com/docs/5.4/csrf

How to disable it if required?

CSRF protection is enabled by default in all routes of Laravel 5 Read more…

Download CSV of table Records using OUTFILE sql command and PHP

Author - Deepika
|
0 Comments
|

Create and Download CSV of table Records using OUTFILE Sql command and PHP

1. Create temporary CSV file using OUTFILE SQL command: OUTFILE command is used to write your sql command output to the specified location. You can write the output to some files using OUTFILE when required Read more…

Compare Passwords in HTML5 form validation using Jquery

Author - Ishpreet Kaur

In one of our projects, requirement was to compare two password values using HTML5 form validation (display the message in the same format as regular HTML5 messages are displayed).

Let us assume that we have a HTML5 form for change password screen:
<form action=”Controller/User.php”
<div Read more…

JavaScript and Jquery Best Practices

Author - Webner
|
0 Comments
|

1. Place Scripts at the Bottom of the Page: If we include script at the top, sometime page elements are not loaded completely and script starts working. So we need to include scripts after loading all the elements. Also if scripts are loaded at the top, browser has Read more…

Postgres | JSONB data type field in PostgreSQL(9.4) and using it in CakePHP

Author - Kailash
|
0 Comments
|

JSONB (JSON Blob) datatype in Postgres is used to save JSON data. We can search on JSONB type of column after creating an index on it.

For example:

Usage in PostgreSQL:

1. Create table and index
CREATE TABLE tests
(
id integer NOT NULL,
email citext NOT NULL,
address jsonb NOT Read more…

Handling twitter and google plus share button in wordpress

Author - Harleen Kaur

Handling content and image sharing with twitter and google plus share buttons in wordpress

To achieve dynamic content(including image) sharing from a website with share buttons (or links) for share and likes on social sites like twitter and google plus, wordpress requires somewhat more specific functions while creating plugin Read more…

Moodle | Writing HTML content into pdf file and sending the pdf file as attachment

Author - Harleen Kaur
|
0 Comments
|

To create a new customized plugin with email functionality and sending a pdf file as attachment requires some simple lines of code with TCPDF library file inside the library directory of moodle. And for performing file operations, filelib.php reference is required. For creating pdf file from HTML content, append Read more…

1 2 3 4 5 6 7 8 9 Next page ›
Send your message