Installing phpMyAdmin on Amazon Linux phpMyAdmin is a web-based database management tool that you can use to view and edit the MySQL databases on your EC2 instance. Follow the steps below to install and configure phpMyAdmin on your Amazon Linux instance. A. Enable the Extra Packages for Enterprise Linux (EPEL) repository from the Fedora project […]
Blur an image in PHP
Blur an image in PHP Demo Sometimes you may needed to blur an image or parts of an image. PHP has several methods to do this which all yield different results.This article shows the desired output using imagefilter method. imagefilter — Applies a filter to an image
1 |
bool imagefilter ( resource $image , int $filtertype [, int $arg1 [, int $arg2 [, int $arg3 [, int $arg4 ]]]] ) |
imagefilter() applies the given filter filtertype on […]
MailChimp API – Subscribe User Through PHP
MailChimp API This ia a Mailchimp API example using PHP and cURL. This will helps you add more subscribers to your MailChimp lists using PHP and cURL Method. So MailChimp let your users to susbscribe and you can send them newsletters in bulk and manage your subscriber’s lists. Things which are required before you start […]
Deprecated features in PHP 7
Deprecated features in PHP 7 Even though PHP 7.0 is a new major version, efforts have been made to make migration as painless as possible. This release focuses mainly on removing functionality deprecated in previous versions and improving language consistency. PHP 4 style constructors
1 2 3 4 5 6 7 |
<?php class foo { function foo() { echo 'I am the constructor'; } } ?> |
The above example will output:
1 |
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in example.php on line 3 |
Static calls to non-static […]
Some PHP Tips
Some PHP Tips There are lot of things which you should follow when working with PHP.In this article ,I am going to look into some useful tips and techniques that can be used to improve and optimize your PHP code. These PHP tips will help you to write a more structured PHP script in less […]
Get the size of an image using a PHP function
Get the size of an image using a PHP function PHP provides a function to get the width and height of an image. getimagesize() Get the size of an image. Description The getimagesize() function will determine the size of any supported given image file and return the dimensions along with the file type and a […]
Create a User Defined Function in PHP
User Defined Function in PHP A user defined function declaration starts with the word “function”: Syntax
1 2 3 |
function functionName() { code to be executed; } |
Note: A function name can start with a letter or underscore (not a number). Tip: Give the function a name that reflects what the function does! Function names are NOT case-sensitive. In the example below, we create a […]
How to make custom Ajax form contact form
Create an AJAX Contact Form A common feature of many websites is a contact form. Standard contact forms work just fine, but you can make them nicer by using AJAX to submit the form data in the background. In this blog post, you’re going to learn how to create a website contact form that submits […]
Encode and Decode query string value in php
There are many ways to encode and decode PHP code.From the perspective of site security, there are three PHP functions — str_rot13(), base64_encode(), and gzinflate — that are frequently used to encode and decode strings of PHP code. Encode and decode with base64_encode() & base64_decode() In this tutorial I will be explaining how to encode […]