16 articles PHP

PHP or Hypertext Pre-processor is a category having all posts related to Core PHP programming.

How to accept payments using Network Online – Payment gateway services?

Today, I am going to share an example of how you can integrate the Payment Gateway Service offered from Network Online (https://uat.timesofmoney.com/direcpay/niecom/home.jsp). 1. Create a PHP file with name “NetworkOnline.php” and the following code. <?php echo "<b>PHP ENCRYPTION KIT FOR NETWORK ONLINE</b>"; $enc = MCRYPT_RIJNDAEL_128; $key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";//enter secret key $mode = MCRYPT_MODE_CBC; $iv =…

How to run you first website on Amazon AWS?

Today, is the time of cloud computing and many of us might not be aware of how to set up your first website on one of the best and popular cloud service providers i.e. Amazon Web Services or AWS. So, I am here to explain or guide you in setting up your first web environment…

How to download or copy large mysql databases with the help of putty?

This is one of the best examples I came across when I got tired in trying to download approax 1 GB of mysql database through phpmyadmin (export). Download large size database(s) using putty ssh access: 1. Download and login to putty Note: – You need to download putty software. Google to get it. – Your…

How to extract large zipped files using linux shell or putty?

Suppose you have created a zip file of around 50 gb and after uploading it or copying it to another location you might come across a situation where the unzipping is not happening as per your expectation. Possible causes can be time out issue, connection break, etc. Below example is a perfect one to solve…

MLM (Multi Level Marketing) Database Logic

Here i am going to explain about the login for MLM database. MLM database means Multi Level Marketing. When a new user will be registered, all the sponsers in chain will get commission. Please find below the code for the same: Here are form fields: $sid = $_POST[‘textfield2’]; $name = $_POST[‘textfield3’]; $email = $_POST[‘textfield4’]; $address…

Important PHP elements and codes that can be used with $_SERVER super global variable

$_SERVER is a PHP super global variable which holds information about headers, paths, and script locations. Below are some elements that can be used with $_SERVER to get effective results. The example below shows the example elements that can be used with $_SERVER in the following form: echo $_SERVER['PHP_SELF']; //Returns the path and filename of…

How to Secure your WordPress website?

There is a great advantage of using Opensource frameworks and content management systems one of the reason is its large support base and contributors, who keep on working to make things easier for use at no cost and this makes it not only popular but a preferable solution to one’s requirement. Popularity comes with a…

Prevent access to files in a directory using file type and htacess – all about website security

This is a simple example illustrating the use of htaccess to block access of files based upon certain file types. 1. Prevent access of .php files in a directory. Create a file .htaccess inside the folder/directory where you do not want the .php files to be invoked or called or executed. Now place the following…

Example to display next month’s date from current date without skipping any day or month in PHP

Want to display next month’s date from current date without skipping any day or month, here is the example: <?php $date = '31-01-2016'; echo nextDate($date); function nextDate($currentDate){ $getCurrentMonth = date("m",strtotime($currentDate)); $getCurrentDate = date("d",strtotime($currentDate)); $getCurrentYear = date("Y",strtotime($currentDate)); $currentMonthplus = $getCurrentMonth+1; $getNextMonth = date("m",strtotime('+1 month',strtotime($currentDate))); if($currentMonthplus != $getNextMonth){ $nextDates = date('t M Y', strtotime('01-'.$currentMonthplus.'-'.$getCurrentYear.'')); }else{ $nextDates =…

Want to add a custom auto suggest form to your store or website? Please read the following post to do so…

Hello Everyone, In this post we’ll be trying to implement a customized auto suggest form with scrolls based upon keyboard up-down keys. Please make sure you have the jQuery library in order to make ajax calls. The following example can be used with any platform. Don’t have jQuery? Click here to download now or try…

Migrated WordPress website to a new server with a new domain, want to update all old domain links with new?

This is a very common but very much of use in the life of WordPress developers. Consider a situation where we have restlessly worked on a website with domain www.example1.com, while adding content, uploading images to posts and other pages we get the domain www.example1.com in all pages or posts data stored in database and…

Primary: Fetch and list Collections or Products from Shopify to your own store?

Hello Users, Today, I’m am going to share with you my recent encounter with Shopify. I was asked to provide the feasibility, process of implementation in performing one of requirements which has now become common. Task: 1. Fetch products from Shopify stores – Details like : Product Name, Price, SKU, Product Image, Tags, etc. 2.…

PHP Glossary

What is the minimum size of the file that can be uploaded using PHP and how can we change this: Be default Maximum size is 2MB and we can change the following set up at php.ini file. Set upload_max_filesize=2M How can we increase the execution time of a PHP script? By changing the following setup…

Example to use Class, Constructor, Functions and Objects in PHP programs

In this post you are going to learn about the use and the concept of Class, Constructor, Functions and Objects in PHP. Please find the below example for the same. <html> <head> <title>PHP example inside HTML tags</title> </head> <body> <div style="background: aqua; color: navy; font-family: cursive; font-size: large"> A simple example page in php :…