PHP is one of the most popular programming languages for developing web projects. But like other scripting languages, PHP also has few security holes that can make our application insecure. In this tutorial, we will take a look at useful tips to help you avoid some common PHP security problems. (more…)
Usually we do remove duplicate words from a text using array functions etc, but it’s quite slow doing that way because of the size of the text. The fastest way to achieve the same result is PHP regex. You can remove duplicate words using PHP regular expressions with preg_replace. Below is a complete PHP example code using regular expression to remove duplicate words from a text using PHP.
We often need to convert a PHP array to a query string for use in a URL or POST request, and vice versa. Really PHP is very rich with its build in functions as it has very useful function http_build_query() to convert a PHP array to a query string. Here in this post, I have an example to convert a PHP array to query string.
Knowledge of configuring PHP is essentials for every PHP developer. Whether you’re working on Windows system (WAMP) or Linux (LAMP), you always need to setup PHP to start a project. So due to its importance, here I have explained some easy steps to setup (PHP, Apache, MySql) on Windows systems and Linux (Ubuntu). (more…)
Web frameworks are very popular among developers. Most of PHP developers always looking for PHP frameworks as these are designed to improve security, make websites easier to upgrade and also dramatically reduce the time it takes you to build websites and web applications. But the big question that most of PHP developers are asking these days is what the best PHP framework is? (more…)
As a PHP developer, we often need to implement functionality to download files. But sometimes it needs to implement large large files download in MB, GBs and create many issues. So here I have created a simple PHP script for file download. This script helps you download files in PHP, capable of downloading files in MB and GBs with any issue. (more…)
As a PHP programmer we always need to write INSERT statement repeatedly to insert records into database. This sometimes makes us annoyed to write same thing again and again in same script. To overcome this, we have created a generic insert script to handle all insert record by just passing array of table field name and table field values. (more…)