Let analyze whether PHP is going to die

Posted on: 15/10/2023
50567 views, 0 comments

According to a lot of online articles, PHP is a dead language that you shouldn't learn. As a PHP developer, I must refute that assertion since I don't believe it to be true.

So, despite what some people may say based on their experience (and personal preferences), I advise conducting an exercise and performing a thorough examination of what PHP is. I also propose seriously considering whether or not it is a dead language.

Read Text File using PHP

Posted on: 25/08/2022
101909 views, 0 comments

Although we have database to work with data, with some circumstances we still need to work directly with files, especially text files. Here in this tutorial, you will know how to read a text file using PHP with a few different functions including fgets()file(), and file_get_contents().

Create and download a Zip file using PHP

Posted on: 18/08/2022
100151 views, 0 comments

To construct a Zip file, PHP has the ZipArchive class. Making files is simpler with this class.

When getting ready a collection of files and folders for download, programming is primarily needed for Zip generation.

The function I'm writing in the example will read every file and folder in the given directory and add them to the ZipArchive class object.

Configuring local subdomains using Wampserver

Posted on: 19/07/2022
97400 views, 0 comments

Compared to using a web server, developing code locally on your computer offers some significant advantages. You don't have to wait for your file modifications to upload to the web, so it's typically faster.

WampServer, a tool that enables you to run a local web environment, will be what I use (Apache, PHP & MySQL). WampServer must be downloaded and installed before you can move on with this tutorial.

Getting text from Image using PHP

Posted on: 13/07/2022
93644 views, 0 comments

Have you ever considered using PHP to read text from images. Indeed you can. There's a probability that one of your web applications will require you to interpret text from an image. Therefore, in today's article, we'll show you how to use PHP to read text from a picture.

Extracting Text from PDF using PHP

Posted on: 06/07/2022
97154 views, 0 comments

PDF (Portable Doc Format) files allow you to store text and image data for offline usage. To show text and graphics online, utilize a PDF file. To embed PDF files in the browser, utilize a web viewer. The text and graphic material are not included in the PDF file that is embedded on a webpage. The inability to render PDF content on the page has an impact on SEO. To get over this issue, extract text from PDF and upload it to the website.

PHP may be used to extract elements from PDF files using the PDF Parser module. This PHP library parses PDF files and extracts the text content from every page. Text, headers, and metadata can all be extracted from the PDF file using PHP. This tutorial will show you how to use PHP to extract text from PDF files.

Convert HTML to PDF using PHP

Posted on: 05/07/2022
95673 views, 0 comments

To illustrate text and graphics in a fixed-layout document, Adobe Systems invented PDF. When downloading information or material from a web application, PDF files are used. Downloading HTML or text content is made a lot easier with the PDF file format. To download the content of web pages as PDF files, HTML must be converted to PDF. This tutorial will show you how to use PHP to create PDF files and convert HTML to PDF.

Dompdf is a PHP package that makes it simple to convert HTML files to PDF files. The Dompdf package makes it simple to generate PDF files in PHP from HTML sites. You can incorporate PDF creation capability into your web application by using the example code provided. Additionally, it makes HTML conversion simple.

PHP Real-time ACLEDA Bank Exchange Rate without API

Posted on: 10/11/2021
97295 views, 0 comments

You usually get Exchange Rate data from other website through Bank or third party API call, so what you can do to get the same thing without API. As you know, exchange rate is very important for all online POS system and other sale web applications. It must be easy if you are given the ready-to-use API from any exchange rate data provider, but making your own data extraction from the exchange rate website is very hard and not reliable. However, here you will be given the best reliable choice to get exchange rate data from any bank or third party websites. Below is the custom PHP script allowing you to get exchange rate data from Cambodia ACLEDA Bank for Khmer Riel currency.

Bootstrap Pagination Using Ajax and PHP

Posted on: 20/12/2014
114449 views, 0 comments

Twitter Bootstrap is the very popular CSS template framework best for modern responsive web design. Bootstrap provides various templates of website design materials including table list, form, content grid, button, graph, model, and so on. In this tutorial, we will take a feature of bootstrap to customize for more user-friendly. Bootstrap only provides the template of table design with static data. With this template, we will make it more flexible with PHP and Ajax. Let’s see how to make it works.

Read Number to Khmer Text Using PHP

Posted on: 18/12/2014
102999 views, 0 comments

This tutorial will explain the technique of reading number (Latin or Khmer character) to Khmer Unicode text using PHP. This tutorial is useful for the website or web application that requires Khmer language and needs to display Khmer number as text by just inputting only the number (Latin or Khmer character). This function can also be used in receipt or invoice generating in web application where the amount/price may need to be written in Khmer text. Example, by putting the number 11989 or ១១៩៨៩, you will get the return string as “មួយមឿនមួយពាន់ប្រាំបួនរយប៉ែតសិបប្រាំបួន” or “ដប់មួយពាន់ប្រាំបួនរយប៉ែតសិបប្រាំបួន”. To see how it works, let’s go through the tutorial.

PHP and Ajax Online User for Admin System

Posted on: 31/08/2014
100876 views, 0 comments

Admin Panel or Back-end site is used to manage and monitor the client or front-end side of the web system. Online user system is very useful to monitor the users to know who is being online, what page they are in, how long have they been online, and so on. With this function, the administrators will be able to monitor the activities of their users by just check the use online status. This feature is very important and necessary for advanced web system like Online Trading System, Online Market System, Online Game System, and other online systems. This feature is generally used with Risk Management System of the CRM of the advanced online web system to monitor the users’ activities.

Dynamic Exporting to Excel by phpExcel and Ajax

Posted on: 08/08/2014
125021 views, 0 comments

It is very common to have the list exportable to save the data from the database to local machine. Doing this with online web list data is not that hard. We would like to recommend using phpExcel to get this work done. However, this tutorial not only introduce that library but also introduce how to using that library dynamically meaning that create your own library to work with the existing library. What does using that library dynamically really mean? To answer this question, let’s suppose there are 4 table lists in our website with different data like customerinfo, customerlog, songlist, and newslist. Therefore, using that library dynamically means having a standard php file containing our own library and be able to be used for all data list type by just identifying the list type.

PHP Download File

Posted on: 08/08/2014
103776 views, 0 comments

In some cases, we really do not want to show the URL of the file to be downloaded. I can be related to the file/directory security or privacy of the file. This tutorial will help to hide the real file URL by just connecting a PHP file with an ID of the row then the push-download will occur.

Ajax and PHP List Navigator

Posted on: 02/08/2014
97462 views, 0 comments

List navigator is the most important and convenient tool for showing the data list view. This will help if there are hundreds or even thousands of data to be display in list. The list navigator helps the users to easily navigate the list rows page by page and also can go to the specific page they want to go. Also, user can customize the number of data to be displayed per page which is very convenient for their laptop, PC, or tablet display.

This tutorial will direct you to create your own data list navigator without refreshing page using Ajax List Navigator.  This will also requires you to understand each part of the scripts to fully implement to your page. Once you understood, you will be able to use this function in every page your wish to have the data list navigator. Please follow the instruction carefully.

PHP Message Smiley Emotion

Posted on: 26/07/2014
102340 views, 0 comments

It is very convenient if we can show our feeling emotionally with our text message to someone we wish to understand our feeling. We might experienced with some social networkslike Facebook where smiley message is very convenient to express the feeling.

This function will display those smiley symbols by converting the smiley charactors to the smiley image. So, smiley image file is needed for working with this function. You may have your own smiley image design or your favorite one by just customizing the smiley images used in the function. The below script and instruction will show how the function works.

PHP Facebook Time Ago Display

Posted on: 25/07/2014
95587 views, 0 comments

It is a good idea to show your visitor the exact comment, post, chat, message, etc. about it dates, especially exactly how low they are untill current time. Showing such this detail date information, your website will be more professional and attractive regarding to this clear and accurate date information.

You may have much experiences with facebook social network where date time ago is very common and attractive. This function will calculate the datetime passed by display the accurate date and time passed with short description text (ex. just now, a few seconds ago, 10 seconds ago, 1 minute ago, 1 hour ago, 1 day ago, etc.).

You can also change the text label to be displayed directly in the function and add some more condition as your need. The bellow instruction will show you the function script and assist you to use the function correctly.

PHP SQL Injection Protection Method

Posted on: 19/07/2014
98909 views, 0 comments

It's very important to secure your login system which can be attacked by various attacking methode. SQL Injection is the common attacking methode that is used to gain the login authetication of the login system.

One of the most common SQL Injection look like this:

' or '1'='1' --

It's very unsecured to use the simple login verification methode to login in your system while currently most online web login system use the more secured way of login.

This tutorial will help to secure your login sytem by just implementing the mysqli_prepare to your login function.

MySQL UTF8 Connection Using PHP

Posted on: 19/07/2014
97096 views, 0 comments
Are you finding a way to get your utf8 characters displayed in your website content?

Actually, there are many languages that use uft8 characters while some others use the alphabet/Latin characters. This PHP function will help you to query your utf8 database contents to your website.

However, there are two functions you can see here: standard query named exec_query() and utf8 query named exec_query_utf8().

PHP Encrypt and Decrypt Code

Posted on: 18/07/2014
102314 views, 0 comments
This PHP functions will help you to encrypt and decrypt your string to the complex code that no one can understand the original string.

For the security reason, this function should be used to encode your secret data to the unreadable string. However, we might know the MD5 or SHA which is the popular PHP built-in encrypting function and cannot be decrypted in the previous time. Now, MD5 is already cracked down with some online website or library that can do that job well.

Now, we introduce you the hand-made functions that is reliable and secured enough to work with your project. So, now let's see how it works.