PHP


23

Aug 2017

Html purifier YII 1

CHtmlPurifier is wrapper of HTML Purifier. CHtmlPurifier removes all malicious code (better known as XSS) with a thoroughly audited, secure yet permissive whitelist. It will also make sure the resulting code is standard-compliant. In your model Add the below content in your model page. for more details : CHtmlPurifier


25

May 2017

Sending Push notification through pushwoosh from php

PHP Pushwoosh notification To send Pushwoosh notification on mobile application using PHP, we need push auth and push application id that we will get from https://www.pushwoosh.com/ and by using those credentials we can easily send push notification to application or other web. For more information click here


26

Aug 2016

Display image in grid view YII2

In Yii 2 there are many function including built-in helper for building urls. So we can easily bulld the url to image by path too . To display the image in grid view : To display the image in DetailView :


02

Aug 2016

Install yii2 advanced template using composer in windows

The minimum requirement for YII2 is that your Web server supports PHP 5.4.0. The installation require following steps: 1: If you don’t have composer, download it from https://getcomposer.org/Composer-Setup.exe and execulete in yout root folder like c:\xampp\php\ 2: Go to your project folder like c:\xampp\htdocs\yourprojectfolder 3. After this run php init command it is just copy files from directory /environments to your project


28

Jul 2016

Regular expression for decimals as well as integers with a range limit

This is an example for regular expression which allow both decimals as well as integers with a range limit of 40-180 Regex Pattern: [4-8][0-9] : Parse Into Range 40 – 89 [4-8][0-9]\d{0,9}(\.\d{1,3}) : Parse Into Range 40.00 – 89.00 9[0-9] : Parse Into Range- 90 – 99 9[0-9]\d{0,9}(\.\d{1,3}) : Parse Into Range- 90.00 – 99.00 with three decimal places 1[0-7][0-9] : Parse Into Range- 100...

Read More


27

Jul 2016

Excel reader in YII2

PHPExcel extension is used to experting and importing Excel to PHP. In this example we are reading Excel data by using this extension and inserting the data in given tables accordingly. PHPExcel extension is used to experting and importing Excel to PHP. In this example we are reading Excel data by using this extension and inserting the data in given tables accordingly. Step 1: Installation...

Read More


02

May 2016

HTTP basic authentication using CURL PHP

CURL is a library that allows you to connect and communicate to many different types of servers with many different types of protocols. Or wecan say CURl is library through which we can make HTTP request in PHP. In order to use CURL funcion you need to install the libcurl package. The basic steps of using CURl function in PHP are: 1) Initialize a curl...

Read More


09

Apr 2016

Google Maps – More Controls

Google Maps – More Controls In addition to the default controls, Google Maps also has: Scale – displays a map scale element Rotate – displays a small circular icon which allows you to rotate maps Overview Map – displays a thumbnail overview map reflecting the current map viewport within a wider area You can specify which controls to show when creating the map (inside MapOptions)...

Read More



Page 1 of 512345