PHP Conference 2023 Calendar of October of User Group Meetings and Conferences By Manuel Lemos The PHP community continues to organize nice events. Events are a great opportunity for all developers to learn from each other.
Read this short article to learn where and when those presential and online conferences and user group meetings of interest for PHP developers will be held in October 2023.
If you want to participate, sign up as soon as possible because many of these events have limited capacity to gather all the developers that may want to participate.
Future of PDO, PHP Classes Ideas, Scan Documents into PDF, Tools for Code Quality - 3 minutes - Lately in PHP 95 By Manuel Lemos The Lately in PHP podcast is back with a new format that is more direct to the point, thanks to the feedback from our audience.
Read this article, watch a 3-minute video, or listen to episode 95 of the Lately in PHP podcast to learn about the best articles published on the PHP Classes site in the week of September 3 through September 9.
How to Quickly Implement PHP Multi Language Support in a Website using Template Scripts By Manuel Lemos Many developers need to create sites that should be available to their users in several languages.
This way, sites can be helpful to more users of many world countries.
This package provides three types of ready-to-use template scripts that can render texts from translation files differently.
How to Use the PHP Google Contacts API Package to Retrieve, Change and Delete Contacts By Stefan Kientzler This PHP Google Contacts API Package allows to access the Google API to have access to people resources like contacts and contact groups without depending on any other library because it only uses the PHP cURL extension.
Read this short tutorial to learn how to use this package to retrieve, change, or delete contacts of a given user with a Google account.
This package can be installed traditionally by downloading the package files from the package download tab or using the modern form, using the PHP Composer tool by following the instructions in the package page download tab.
How Check If Two Images Can Be Copies using a PHP Image Correlation Package that Uses JavaScript to Perform Browser Side Calculations By Manuel Lemos Comparing images can be a valuable activity for many types of applications.
For instance, an application can determine if an image is mostly a copy of another embodiment.
Another application can compare two movie images to determine if there are significant changes between the two scenes.
This package implements an image comparison approach calculating a correlation factor using JavaScript and PHP code.
How to Implement a PHP ChatGPT Client in a Laravel Site Integrating a Laravel Nova By Manuel Lemos ChatGPT is a popular artificial intelligence service that allows users to ask questions using natural language.
Laravel Nova is a package that allows developers to implement modular administration panels in sites implemented using the Laravel framework.
This package implements an integration between the ChatGPT service and a panel that lets users ask questions to the ChatGPT service using its API from a Laravel application.
This possibility allows users of a Laravel application to quickly ask questions and get answers in the same place as a site where the users perform site administration tasks.
How Can PHP Detect AdBlock Used by Site Users to Educate Them to Support the Site that They Love and Keep Sites Financially Viable By Manuel Lemos Many sites place ads on their pages to earn more revenue while providing free access to site resources.
Some users who dislike seeing ads use ad-blocking extensions in their browsers to avoid showing ads.
When ads are blocked, the site owners who depend on advertising revenue to keep the sites running pay for all its costs and may be unable to control the sites open.
This package uses a JavaScript library to show messages to users that block ads to let them know that the advertising revenue is necessary to give them access to the site resources.
This way, conscious users may unblock ads for the sites that show these messages.
How to Use PHP Array Intersection to Find Patterns of Common Values to Implement Artificial Intelligence Solutions Based on Past Patterns By Manuel Lemos Some applications need to analyze different sets of values to find what they have in common.
This is the case with artificial intelligence applications that try to find patterns they can recognize to compare with situations they detected in the past and help those application users make good decisions based on the patterns they found.
This package can analyze multiple sets of values to find the deals all groups have in common.
The package provides classes that use PHP generators and iterator interfaces, so developers that use this package can process the intersection results in one value at a time.
How to Implement PHP Voice Recognition that Uses the Web Speech API to Transcribe the Words of the User Voice Commands By Manuel Lemos Many users like to interact with Web sites using voice because they will have the hands free to do other tasks.
Nowadays, there is a W3C standard to implement voice recognition called Web Speech API.
This package uses an implementation of the Web Speech API based on the Google Chrome browser called webkitSpeechRecognition.
The package can capture the user's speech and call the webkitSpeechRecognition API to transcribe the speech to text.
This allows PHP developers to implement applications that are activated by commands from the users via their voices.
How to Use a PHP Analyze URL Tool to Check a Web Site for Issues or Learn How to Implement Good Practices By Manuel Lemos Many developers learn about aspects of other sites by analyzing how the sites are implemented.
This is a good habit that is useful for developers to learn how to implement certain good practices from other sites or even check if their sites have issues they need to fix.
This package implements a Web site analysis tool that provides different analysis tools with an easy-to-use user interface.
How to Use a PHP API Generator Tool to Simplify the Development an API By Manuel Lemos API development is complex. Developers that want to create an API need to take of many aspects of a working application like the API functions, API routing to classes that will implement the API calls, API user authentication, etc...
This package simplifies the process by providing an application that can generate files to implement an API from parameters passed via command line parameters or via an interactive user interface that can run from the command line console.
Google and Intel to Help PHP 7 to Become Faster and More Secure - Lately in PHP podcast episode 62 By Manuel Lemos Recently researchers from Google and Intel have approached the PHP core developers to offer to contribute to PHP development by implementing features that will make PHP fast and more secure.
These Google and Intel researchers help offers and their first proposals was one the main topics commented by Manuel Lemos and Arturs Sosins in the episode 62 of the Lately in PHP podcast.
They also commented on a proposal for having type hinting in class variables in future PHP 7 versions, new reports that show how PHP 7 performance is improving on day by day basis, as well other PHP 7 feature proposals.
They also commented on the latest PHP tutorial articles and book reviews published in the last month.
Listen to the podcast, or watch the hangout video, or read the transcript to learn more about these interesting PHP topics.
How to Use a PHP Women Menstruation Days Calculator to Help Couple Partners to Prepare for Dealing with Difficult Days for Women By Manuel Lemos The menstruation date is important to many adult women and their couple partners.
Many couples that may only want to have children when they are ready or do not want to have children need to be careful to avoid having sex when the woman is in the fertile period.
If the couples know the menstruation date and the low fertility days of the woman, they know when are the safe days to have sex without the risk of getting pregnant.
This package helps users calculate the safer days considering the last menstruation data and the average length of the woman's menstruation cycle.
How to Implement a PHP Search Engine that Can Crawl, Index and Present Results Only of Specific Sites By Manuel Lemos Popular search engines like Google are handy for finding content on sites where users don't know where those sites are.
When users want to search more specific sites that they know, general search engines like Google are not ideal.
This package provides a PHP application that lets users index and search only the sites they want.
How to Implement a PHP AJAX Image Upload with Progress Bar to Show How Much of a Large File Was Uploaded By Manuel Lemos Many sites need to process image files uploaded by users using Web forms.
When the image files are large, uploading may take a lot of time.
In that case, it would be better to show a progress bar to let the users know how is the image file upload process going.
This package shows how to use AJAX support and the progress event to offer a percentage of the file uploaded to the server.
How to Use a PHP Cloud Hosting Service that Is Fast and Easy to Configure By Manuel Lemos If you are a serious PHP developer, you must have experience with cloud hosting platforms.
Even if you do not have experience with cloud hosting, this article will help you better understand the current Cloud hosting options so that you can make a good choice for your next PHP site or API project.
Read this article to learn about existing alternatives for good Cloud hosting solutions, as well as get a recommendation for a simple and affordable cloud hosting option that you can try for free to test before you decide that it is a good option to host your PHP projects.
3 Last PHP 8.3 New Features By Manuel Lemos PHP 8.3 feature freeze ended July 18, 2023. This means no new features will be added to PHP 8.3.0, released around November and December 2023.
Read this article to learn the last four features implemented to know what you can expect when the final PHP 8.3.0 is released.
How Can PHP Generate Form from Database Table that Stores Application Configuration for All Users By Manuel Lemos A significant part of the mature applications have configurations that the application users can edit.
Usually, developers store the configuration values for each user in some container, for instance, database tables. Then they develop a user interface to let users edit their configuration values.
This package provides an alternative solution that lets the application developer create model classes for each configuration they want to let the users edit.
Then the application can generate form groups that can be added to a form to let the users edit the configuration values on a Web page.
This way, developers can spend less time implementing Web forms to let users edit their application configuration settings.
How to Integrate a Laravel Site with a Woocommerce Site using a Laravel Woocoomerce Package By Manuel Lemos Woocommerce is a prevalent e-commerce application built on top of WordPress.
Woocommerce exposes API functions that API clients can call to manipulate objects of an e-commerce site like customers, products, orders, etc...
This package makes calling those Woocommerce API functions from a Laravel application easy.
How to Use a PHP Test Coverage Tool to Improve the Quality of Your PHP Projects By Manuel Lemos One way to measure the quality of a software project is to measure the ability of the project code to test itself and verify that the code works as intended.
The projects with the best quality often provide tests that cover a significant part of the code.
This package provides means to measure the extension of the tests provided by a Laravel package to test its features implemented by routes.
This way, developers can understand how much of their project code is covered by tests. Therefore they can also have an idea of how many tests need to be added to improve the coverage of the project tests.
How to Use a PHP Server Monitor Package For Free to Be Notified When a Site is Down By Manuel Lemos Every Web project needs to be monitored to confirm it responds well when the users access the site.
One way to monitor a site is to try to access one page and check if it is responding quickly.
This package provides a script that responds to accesses from a separate server.
The script can check an internal file that records the last time the site application responded well.
If it passed over a given time, the script can record a downtime moment and output a response displaying the current downtime.
This way, a developer can implement a simple server status script cheaply.
How to Animate and Show the Conway's Game of Life PHP Implementation in a Web Site By Manuel Lemos Game of Life is a concept created by John Horton Conway to define how the life of cells will happen in an ecosystem limited by rules.
The life of the cells can be animated and displayed on a board so the users can see what happens to the cells after each game iteration.
This package implements a PHP version of the Game of Life. The package can render the changes to the life of the cells in a Web page updated by this package on each iteration.
How to Upgrade to a Newer PHP Version Using a PHP Backwards Compatibility Library By Manuel Lemos With every new PHP version, changes are made to the PHP language that may introduce incompatibilities between versions.
If your PHP applications rely on parts of the language that were changed, you may need to change your code to keep it working in the new PHP version that runs on the machine your PHP application is running.
Suppose your PHP application relies on PHP function or other parts of the language that changed in a backward incompatibility way. In that case, you may need to change your PHP application code to adapt to the PHP version changes.
This package provides a library of scripts with PHP functions that emulate the functions introduced in newer PHP versions.
Using this library, you can adapt your PHP application code to make it work in a newer PHP version without having to upgrade the PHP version that you use in the environment your PHP application is running.
This way, you can change your PHP application code to prepare to make it work in newer PHP versions making a smooth transition between PHP versions.
Why You Need a PHP Backwards Compatibility Library Before You Upgrade to a Newer PHP Version By ASCOOS CMS Whenever you consider upgrading to a newer PHP version, you need to be careful because parts of the code of your PHP projects may stop working.
Read this article to learn more about the issues you may face during the PHP version upgrade and how the PHP Backwards Compatibility Library may help you to solve those issues.
How to Implement a PHP MySQL Update Schema Procedure Very Quickly By Manuel Lemos Sometimes applications that use a database to store their data need to update the schema of the database tables to be able to implement new features.
Usually, developers start making changes to the database schema in the development environment. When the changes are well tested, they need to implement the same schema changes on the server-side.
This package provides a solution that uses schema definition files in JSON format to update the database schema either in the development environment or the production environment.
How to Use a PHP OCR Image to Text Extractor based on a WordPress Plugin that User the Tesseract.js API By Manuel Lemos Sometimes it is necessary to read text written on images so the textbook can be processed for useful purposes like scanning a book's pages into an image, extracting the text and editing it, and improving it for publication.
This package provides a WordPress plugin that uses the Tesseract OCR JavaScript API to extract text from an image a WordPress user offers.
3 PHP 8.3 New Features Implemented Before Feature Freeze By Manuel Lemos PHP 8.3 is expected to be released around November and December of 2023.
The feature freeze date is coming on July 18, 2023. After that date, adding more new features to PHP 8.3 will not be allowed.
Therefore several proponents of new PHP 8.3 features that were voted accepted have finally added the code to implement those features.
There will be a few months to test these features before the final PHP 8.3.0 release.
Read this article to learn what those features just implemented for PHP 8.3, so you know what you can expect when the final PHP 8.3.0 is released.
How to Use a Prepare to Upgrade to a Newer PHP Version Using a PHP Backwards Compatibility Library By Manuel Lemos With every new PHP version, changes are made to the PHP language that may introduce incompatibilities between versions.
If your PHP applications rely on parts of the language that were changed, you may need to change your code to keep it working in the new PHP version that runs on the machine your PHP application is running.
Suppose your PHP application relies on PHP function or other parts of the language that changed in a backward incompatibility way. In that case, you may need to change your PHP application code to adapt to the PHP version changes.
This package provides a library of scripts with PHP functions that emulate the functions introduced in newer PHP versions.
Using this library, you can adapt your PHP application code to make it work in a newer PHP version without having to upgrade the PHP version that you use in the environment your PHP application is running.
This way, you can change your PHP application code to prepare to make it work in newer PHP versions making a smooth transition between PHP versions.
PHP ChatGPT API Example to Seed Database Records With Useful Constant Data Like Countries List By Manuel Lemos Many applications need to initialize databases with constant values like, for instance, the names of the countries of people with personal data records stored in the application database.
Usually, developers need to manually feed this data into the application to store the data in the respective database table records.
This package provides a more automated approach to solving this problem. It uses the ChatGPT API to retrieve the necessary data and inserts it in the expected database table records.
How Can PHP Export MySQL Query Results to Excel XLSX File Served for Download By Manuel Lemos Many people and companies use Microsoft Excel to view and manipulate financial and other types of data that can be presented on a grid of cells.
Sometimes the data they need to view or manipulate is stored in a database.
Many PHP applications use a MySQL server to store data that the people or companies want to view in Microsoft Excel.
This package provides a simple PHP script that shows how to extract data from a MySQL database and generate a Microsoft Excel spreadsheet that can be downloaded and viewed in the Microsoft Excel application of the user that accesses the PHP site that uses MySQL.
How to Use a PHP OpenSSL Encrypt Large File Package to Protect Large Data Without Using Too Much Memory By Manuel Lemos Some applications must encrypt data before storing or transmitting it to other computers.
Existing PHP extensions like OpenSSL support great encryption algorithms.
Usually, these algorithms are used to encrypt data from small text strings.
This package implements classes that can encrypt and decrypt large data by reading the data from files.
This way, these classes can handle encrypting and decrypting data that may take more memory than the limit that PHP is configured to use.
How to Display a PHP Website Top Pages in a Block Using ASCOOS Content Management System By Manuel Lemos Many sites are managed using content management systems that can perform common resources that the site owners want to provide to the site users.
Having a page with a list of the most popular content is an excellent resource that is interesting for content sites to have.
This package provides a module for the ASCOOS content management system that can generate a block to display in a site managed by this system to display the top content on one or more pages.
How to Perform PHP Object Initalization from Arrays or Named Parameters By Manuel Lemos Hydration is the process of initializing an object variable using values obtained separately.
A hydration class can, for instance, take an associative array, traverse the array values and assign class variables with the values of the array entries that have the same key value as the class variable name.
This package allows hydrating of an object from an associate array with the class variable values.
If you run PHP 8 or later, the package can hydrate an object of named argument values. This way, the object creation and initialization can be done using a single line of readable PHP code.
How to Retrieve PHP Application Configuration in a Secure Way Using Encrypted Environment Variables Stored Remotely By Manuel Lemos Many PHP applications use environment variables to share configuration values between different parts of the code, such as database configuration values.
Often these configuration values are sensitive information that should be kept private to protect that information.
This package uses an extension that loads and saves environment variables and the respective values in a remote service named EnvKey in an encrypted way.
This way, the application can share environment variable values for an application that can use a hosting environment distributed between multiple machines.
It uses encryption to avoid sharing sensitive information with the EnvKey service.
How to Use a PHP Image Compression on Upload to Reduce the File of Large Image By Manuel Lemos Some PHP sites take images from users using upload forms. When the sites take too many photos, it may exceed the disk space provided by the hosting company.
To avoid exceeding the available disk space and still be able to take many image files uploaded by the site users, using a compression solution may help.
This package can reduce the file size of uploaded images by processing the image files and saving them with a lower quality factor.
The image quality may be lost, but the files may take up much less space.
This way, PHP developers that use this approach avoid paying more money to the hosting company when they manage sites that need to take a lot of images that may occupy a lot of disk space.
PHP Classes Site 24th Anniversary and Future Plans By Manuel Lemos The PHP Classes site completed 24 years of existence.
We are swamped working on new developments that will benefit the site community.
Please read this article to learn more about the upcoming developments that will help you have a better life as a developer.
How to Use a PHP Holiday Library to Find the Exact Date of Well Known Holidays Every Year By Manuel Lemos Several types of holidays may be exceptional because they celebrate the lives of unique members of each family. That is the case of Mother's Day, Father's Day, Grandmother's Day, and Grandfather's Day.
The exact date of these holidays may change year after year.
This class can perform calculations to determine the dates of those holidays.
How to Check If You Are Using the PHP Line Length Best Practices By Manuel Lemos Many developers look at other developers' code to determine if they can understand what the code does to decide if it is helpful to use in their projects.
The readability of PHP code is one factor that may help other developers to understand the code that one developer writes.
One aspect of the readability of the code is the length of the line of code. PHP code that has very long lines is tough to read.
This package can analyze the PHP code of given source files to return valuable statistics about the length of the lines of code of those source files.
This way, other developers may know how easy or hard to read the code of a PHP project can be.
How to Use a WordPress Hotel Booking Plugin to Allow Users to Book Rooms Without Leaving the Hotel Site Implemented Using WordPress By Manuel Lemos Hotel room booking is part of the promising business sector that is tourism.
This package implements a plugin that can be used to implement the hotel booking process from a WordPress site.
The WordPress site can promote a hotel's business with content about the hotel and nearby locations that may be useful to tourists.
The plugin calls a custom API that needs to be provided on the server side to perform the actual room checking and booking actions.
This way, this package can work with many types of booking systems that already exist.
How to Add Frequently Asked Questions to WordPress Articles using a WordPress FAQ Plugin By Manuel Lemos WordPress is a well-known content management system that is very popular partly due to the possibility of being extended with plugin packages that can increase the list of WordPress site features.
A WordPress plugin can be used to insert blocks of content that may increase the interest and relevance of the content published on a site.
This package provides a plugin that allows published to edit and publish FAQ (Frequently Asked Questions) blocks in WordPress pages.
PHP Conference 2023 Calendar of July of User Group Meetings and Conferences By Manuel Lemos The PHP community never stops and is quite alive. Many PHP developers are so busy that they cannot attend presential events.
Therefore we can see that some PHP user groups and conference organizers are now providing online alternatives to events that used to occur in physical locations.
Read this short article to learn where and when those presential and online conferences and user group meetings of interest for PHP developers in July 2023.
If you want to participate, sign up as soon as possible because many of these events have limited capacity to gather all the developers that may want to participate.
How to Use a PHP Image API to Get the Image of the Day from NASA By Manuel Lemos NASA is the well-known North American Space Agency that does space exploration activities.
NASA often capture images from planets and stars that they observe in space.
They provide an API that can return what they call the image of the day.
This package provides a simple script that can retrieve and display the NASA image of the day.
How to Add Authentication to WordPress API Functions Provided using WooCommerce API Plugin By Manuel Lemos WooCommerce is a popular e-commerce platform developed in PHP based on WordPress.
It also provides the possibility to expose an API that can be used by external applications to integrate with WooCommerce.
Any application based on WordPress can be extended by plugins that provide additional functionality to make it more useful.
This package provides a plugin that implements several types of authentication to the API calls that can be added to the WooCommerce API.
This way, access to the API calls can be restricted to applications that can perform the authentication steps based on the OAuth protocol or simple parameters passed in the API call URLs.
7 PHP 8.3 New Features that You Will Want to Use After PHP 8.3 Release Date By Manuel Lemos PHP 8.3's final release is expected around November and December of 2023.
Read this short article summarizing the list of new features in just a single line per feature.
The article also provides links to pages with more details and example code for you that want to see how your PHP code can look like after you upgrade to PHP 8.3
How to Use a PHP Active Record Library to Implement Behaviors Useful for Many Applications By Manuel Lemos ActiveRecord is a common design pattern many software applications use to map objects containing the information of entities that the applications need to manipulate into database records.
There are ActiveRecord implementations in many programming languages that use different frameworks.
The package extends the ActiveRecord implementation of the PHP Yii2 framework to implement more explicit behaviors useful for many applications, such as specifying read-only attributes, timestamp attributes, and type casting.
PHP Current State and Performance in 2023 By David Tamas PHP is a modern and powerful language, but new language elements should be used with caution.
Please read this article to learn a few facts about PHP's current state and performance level according to the experience of David Tamas (that's me), a long-time experienced PHP developer.
How to Implement a PHP Contact Form to Send Email to Site Users Without Using a Database Server By Manuel Lemos Contact forms are prevalent features many sites have to let users contact the site managers to send important messages.
This package implements a contact form manager that stores messages in an SQLite database.
Since SQLite uses local files, it does not require a database server. This package does not need a database server to store contacts, making it simpler to implement in any site with PHP code.
How Does the PHP Code Generated By OpenAI Artificial Intelligence Services to Answer Developer Questions Looks Like By Manuel Lemos Generative artificial intelligence tools can generate files in many formats.
Programming code files are one of the types that artificial intelligence services like those from OpenAI can generate.
This package provides several examples of code in PHP and other languages generated by OpenAI services when they try to answer many developers' questions.
How to Merge Excel Files into One Using PHP By Manuel Lemos Excel is a popular tool for creating spreadsheets. It saves spreadsheet data in XML-based format, which usually is called XLSX.
This XML format makes it easy for PHP developers to process and create spreadsheet files in Excel XSLX format.
This package provides a script that uses an Excel parser and generator classes to show how to parse several Excel spreadsheet files and combine their values to generate a new spreadsheet that merges the importance of all spreadsheets in a single spreadsheet.
This way, other developers can learn to process multiple spreadsheets and combine them in a way that is convenient for their application purposes.
How to Add Email Functionality to Your PHP AppBy Andriy ZapisotskyiPHP provides a quite poor functionality for building and sending emails. Its built-in mail function () doesn't support SMTP authentication and this way works well just for simple messaging.
How do you send branded email notifications, confirmation, and even newsletters from your PHP app then?
There are three the most popular and reliable external packages: PHPMailer, Pear Mail, and Swift Mailer. Read this article to learn more about these solutions, their capabilities and with code examples.
Make SQL Queries Run Faster Using the EverSQL MySQL Query Optimization Tool - 4 minutes - Lately in PHP Podcast Episode 93 Part 6 By Manuel Lemos Slow SQL queries are one of the factors that can make sites slower and cause harm to the user experience.
Fortunately, optimization tools can suggest small changes in your database schema that can make your SQL queries run much, so your Web sites can provide a much better user experience.
EverSQL is one of those optimization tools that can suggest effective changes for databases stored in MySQL servers or some other server compatible with MySQL, such as MariaDB.
Read this article, watch a 4-minute video, or listen to part 6 of episode 93 of the Lately in PHP podcast to learn how to optimize your MySQL database using the EverSQL tool for free.
How to Implement a PHP Progressive Web App for E-Commerce that Provides Great User Experience By Manuel Lemos Many PHP developers get customer requests to develop applications that allow their customers to place orders for pizza on the Internet.
This package implements a progressive Web application using PHP and JavaScript to implement a complete pizza ordering system.
This application helps other developers learn how to implement advanced Web applications for e-commerce or even other applications that can work without requiring users to install native applications for Android, iOS, or other mobile devices.
How to Avoid PHP Bugs using Type Safe Variables By Manuel Lemos Type safety is a characteristic of languages that require certain operations with values of the correct values. This characteristic is good for catching bugs early in application development.
PHP was not originally a type-safe language. PHP is more tolerant of developer mistakes. This fact makes PHP a more accepted language among developers without formal education in programming.
This package provides a solution to make PHP more type-safe to avoid that applications shipping code with programming mistakes.
It provides several classes that implement type-safe operations, including some that are useful for cryptography applications.
With this package, you can implement cryptography applications with greater quality when compared to applications that do not use type safety.
How to Keep Track of All PHP Errors Not Showing to Users and Happen in the Same PHP Script By Manuel Lemos Sometimes PHP applications need to keep track of multiple non-fatal errors that may happen during the execution of the same PHP script.
This package provides a simple class that can keep track of all error messages and codes that happen every time the current PHP script calls the class.
This possibility allows application developers to get a complete list of errors in executing a single script.
How to Use a PHP BlockChain API to Append Data to Your Application BlockChain Records By Manuel Lemos Chronicle is a Web service application that can process HTTP requests to append data in blockchains.
The Quill package is a PHP client package that can write data to a Chronicle server to update blockchains.
This package allows the creation of distributed clients that can generate blockchain data stored in a Chronicle server.
How to Implement a PHP WhatsApp Bot to Provide Integration of Web Applications with WhatsApp By Manuel Lemos WhatsApp is a popular chat application used by many millions of people around the world.
This package provides a solution for applications to send messages to other users and interact with them using the Villaments API.
How to Create Custom Posts with PHP Template Scripts Using a WordPress Custom Post Type Plugin By Manuel Lemos WordPress is a popular content management system written in PHP. It is very flexible, allowing developers to extend the system's capabilities in many ways.
One of those ways to extend WordPress capabilities is to create custom post types.
This package provides a class that can improve WordPress custom posts. It can render the pages of custom posts automatically using PHP scripts that define templates to generate the post HTML.
How Can PHP Get Page Content of a Past Version of a Web Site to Find Security Issues Due to Recent Changes By Manuel Lemos The Web Archive is a site that can show past versions of Web site pages. It provides a service that retrieves Web pages on different dates.
This way, it is possible to retrieve the contents of a given page as it was on past dates.
This package provides a command written in PHP that you can run from the command line console to retrieve many versions of the same. It can use threads to recover many pages faster.
The ability to retrieve past versions of a page can help detect changes caused by security incidents.
Security professionals can compare the versions of the same page to find pages that were changed and may need a new security auditing process to determine if people with bad intentions caused the changes.
How to Implement a PHP Social Network Script That Posts the Same Content in Multiple Social Networks at Once By Manuel Lemos Many sites post content to multiple social networks to get more exposure.
If a single content post needs to be done separately for each social network site, that takes a lot of time for the person posting the content to all the social networks.
This package provides a more automated solution that can take much less time for the person doing the work to post on social networks.
It requires sending a single email message with the content to post to the cloud email service. Then that service can process the content and distribute it to different social networks.
How to Help the EverSQL Tool Optimizing MySQL SQL Queries More Efficiently by Passing It Your MySQL Database Metadata - 4 minutes - Lately in PHP Podcast Episode 93 Part 5 By Manuel Lemos The EverSQL tool is excellent for suggesting optimizations for SQL queries for your applications that use MySQL.
That tool must first obtain the structure of your database tables to suggest good optimizations. You can get that structure by executing a SQL query that extracts the database metadata.
Read this article, watch a 4-minute video, or listen to part 4 of episode 93 of the Lately in PHP podcast to learn how to extract your MySQL database metadata to help the EverSQL tool to optimize your application SQL queries for free.
How to Use PHP to Compute a GitHub Score for the Participation of a Developer By Manuel Lemos GitHub is a popular site for hosting development projects. It keeps track of the activity of each developer that contributes to the projects hosted on the site.
This package can analyze the participation of each developer on GitHub, and then it computes a score based on the types of events in which the developer participated.
This way, this package can give a better idea of how active each developer is in the projects hosted on GitHub.
How to Implement a WordPress Plugin Currency Converter By Manuel Lemos WordPress is a popular content management system written in PHP that allows developers to extend the types of content inserted into a page using plugins provided by any developer.
This package provides a WordPress plugin that allows site publishers to insert the currency exchange rate between the United States dollar and the Real currency of Brazil.
How to Implement a PHP Maintenance Mode to Show Useful Messages to the User of a Site While the Maintenance Work Lasts By Manuel Lemos Once in a while, Web sites must perform maintenance tasks, such as updating the site application database schema to support new features.
During maintenance updates, the sites should not be accessible to regular users because the maintenance tasks may cause user interactions that lead to changes in information stored in the site database.
This package provides a solution to implement maintenance mode behaviors, for instance, showing warnings or only allowing administrators to access certain features of the sites.
How Can PHP Send Email Using Gmail SMTP Server for Free Using OAuth Tokens That Renew Automatically By Manuel Lemos The Gmail SMTP server has required OAuth-based authentication to send email messages since May 2022 for Gmail users of free accounts.
The OAuth process obtains token string values from the Gmail OAuth server. These token strings are a sort of password to access the Gmail SMTP server.
The token strings are valid for a period that currently is 1 hour. After that period, applications that use the Gmail SMTP server will have to renew the tokens using the OAuth process again.
The MIME Message package uses the SASL package to perform authorization. The XOAUTH2 driver class of the SASL package can renew the OAuth token automatically when necessary.
Please read this article to learn with example code how to use the PHP MIME Message, SMTP Client, SASL, and OAuth client packages to send email messages using PHP with the Gmail SMTP server in a way that does not require human intervention to renew the OAuth tokens automatically after they expire.
How to Implement a Modern WordPress User Interface using a WordPress Vue Plugin By Manuel Lemos Vue.js is a popular JavaScript framework that you can use to implement modern user interfaces for Web sites.
WordPress is a popular content management used by many sites to produce and edit content published in the Web site pages. Developers can extend WordPress with plugin components provided by third-party developers.
This package provides a plugin that implements WordPress plugins that can use Vue.js to implement modern user interfaces for accessing other WordPress plugins.
How to Implement a PHP Crowdfunding Site to Support The Development of Product to Be Launched in the Future By Manuel Lemos Many people want to launch new products on the market. They have great ideas, but they also need to take time to develop the development and launch the call. When they create the product, they also need money to buy food and other essential products to live with good quality.
One possible solution for the developer to have money during product development is to resort to crowdfunding. This way, the potential users of the product can fund the developer so he can dedicate his time to developing the product.
This package can help a developer to set up a site to present his product and collect crowdsource funding payments.
Introduction on How to Use the EverSQL MySQL Query Optimizer Tool for Free - 3 minutes - Lately in PHP Podcast Episode 93 Part 4 By Manuel Lemos When you want to optimize SQL queries to optimize an application that uses MySQL, you can use "manual" methods. These methods require good SQL query optimization knowledge. If you need to optimize many SQL queries, doing it "manually" may also take time.
One way to optimize SQL queries without requiring you to learn so much about optimization is to use a SQL query optimization tool. Optimization tools also take you much less time to optimize many queries than if you try manually.
Read this article, watch a 3-minute video, or listen to part 4 of episode 93 of the Lately in PHP podcast to learn how to use a free tool to optimize MySQL SQL queries without much knowledge and faster than if you try to do it manually.
How to Generates a Kubernetes Configuration File to Setup a Container using PHP By Manuel Lemos Kubernetes is a system to manage containers used in many cloud hosting systems.
Containers are helpful for managing and running applications that can run isolated, including those that implement PHP-based Web applications.
This package provides a simplified way to generate configuration files for Kubernetes containers from given parameters.
How to Implement a PHP Automatic Form Fill Solution that Pre-Fills Form Inputs with Values Entered Before by the Same User By Manuel Lemos Many Web site users do not have much patience to do repetitive tasks.
If they have to fill out lengthy forms with information, they may avoid it and not fill it, especially if the form asks for values already requested.
This package provides some help to minimize that issue. It provides a solution to "remember" the values that a user filled in a form with the same types of inputs.
So next time a Web site asks the user to fill a form with the same fields, this package can provide the values the user entered last time so that the application can pre-fill the inputs with those values.
How to Use a PHP Travel Planner Application to Help You to Move to Another Country and Have a Better Life By Manuel Lemos Many people who want a better life try to move to another country.
Often that is a non-trivial change of life because it requires a lot of preparation, for instance, planning how to arrive at the destination country, where you will stay, how much it will cost, etc.
This package implements a Web application that allows users to do the necessary planning to move with the least of the problems.
How to Implement a PHP SMTP Gmail Replacement for the PHP mail Function that Works with the Gmail OAuth Authentication By Manuel Lemos Many developers use Google Gmail to send email messages to their users because Gmail is a free service that works well.
In 2022 Google made the use of Gmail as a means to send email messages via Gmail SMTP server more secure by requiring an OAuth access token instead of the traditional password of the Gmail user account.
This requirement made many developers update their PHP applications to use OAuth tokens and continue to use the Gmail SMTP server for free.
Read this article to learn how to use OAuth access tokens to send email messages from PHP applications using the Gmail SMTP server.
How to Avoid Security Issues using PHP URL Redirect Follow Class to Discover the Final URL of a Short URL By Manuel Lemos Short URLs help pass URLs of pages to other people in a way that may be easier to remember or type.
One challenge of short URLs is that they hide the actual destination URLs. If the pages of destination URLs have security issues, the users that get short URLs may not be aware of that until they access the short URL destination pages.
This package finds and returns the destination URLs of a given short URL. It may also return any intermediary URLs that browsers may need to access until they reach the final destination URL.
This way, developers may use security tools for auditing the safety of the final destination of the short URL, as well as all intermediary URLs.
How to Use a WordPress Events Plugin Manage and Publish Organized Events By Manuel Lemos WordPress is a well-known publishing platform that can work for other purposes besides publishing blog posts using plugins that extend the possibilities of the original WordPress software.
This package implements a plugin that can transform a WordPress site into a regional event publication site.
How to Quickly Add a Laravel Shopping Cart to a PHP Web Site to Sell Your Own Products By Manuel Lemos Many Web sites have a shopping section on which they can sell products to their users.
The developers of those some of those sites use the Laravel framework to implement the area with less effort than if they develop the sites using PHP without any framework, content management system, or library dedicated to creating shopping sites.
This package can help quickly add a shopping section to a site that already uses the Laravel framework, thus reducing the effort to add this feature.
How to Use Simple MySQL Monitoring Tools for Free to Find the Slowest Queries that You Should Optimize First - 2 minutes - Lately in PHP Podcast Episode 93 Part 3 By Manuel Lemos When you want to optimize the performance of a MySQL-based application, you should try to optimize first the slowest queries that affect the application's performance.
The MySQL slow query log file provides a list of slow queries as they happen. So you need to monitor that file to determine the most critical slow SQL queries you need to optimize first.
Read this article, watch a 2-minute video, or listen to part 3 of episode 93 of the Lately in PHP podcast to learn how to use a free tool to monitor the MySQL slow query log and find the slowest SQL queries.
How to Buy a PHP Elephant Personalized with Your Logo By Manuel Lemos The PHP elePHPants are lovely mascots that many PHP developers love for being a symbol of their favorite language. The PHP Classes site sells plush toy versions of the PHP elePHPant.
Today we are announcing a significant improvement to the PHP ElePHPant mascot toys we are making available to make these plush toys even nicer.
From now on, you can purchase a personalized version of the PHP ElePHPant. This fact means that the plush toy may show a logo of your choice on the opposite side of the belly where it shows the PHP logo. Your logo can be an image with your name, your company name, or some other type of image that you can share with us.
Read this article to learn more about these new personalized elePHPants and how you can buy them so you can get them for yourself or for the people that you love the most in your life, hopefully in time for Christmas.
How to Implement a PHP User Guide Automatically to Help Users of Your Applications using Templates By Manuel Lemos Documentation is essential for projects of any kind to help users learn how to use those projects when they do not know how to use them or have doubts.
A good practice for providing project documentation is to have a user guide that presents all the aspects that may be useful for the project users.
This package provides a solution to help users of any project to generate documentation from templates.
It also allows the definition of navigation menus that configure the package to provide the structure to render the different parts of the project user guide.
How to Find MySQL Slow Queries in a Production Server by Activating the Slow Query Log - 2 minutes - Lately in PHP Podcast Episode 93 Part 2 By Manuel Lemos When you want to optimize a MySQL database application in production, you should figure out the slowest queries in that environment.
Enabling the MySQL slow query log can help you figure out the slowest SQL queries to optimize first. You can do that in a production environment, but you need to take extra care with how you enable the slow query log to avoid causing harm to the application.
Read this article, watch a 2-minute video, or listen to part 2 of episode 93 of the Lately in PHP podcast to learn how to enable the MySQL slow query log in a production environment in a safe way.
How to Use PHP to Send Web Push Notifications for Your Web Site in 2022 By Stefan Kientzler Many sites need to keep their users up to date about new content even when they are not looking at the site.
Web push notifications can solve this problem by showing notification windows with short messages telling the user there is something new on the site that they authorized to be notified when new content is publishe.
Read this tutorial article to learn about how you can implement Web push notifications in your sites using PHP.
How to Implement a Laravel Consent Cookie to Keep Track of Adult Users That Stated they Have 18 Years or More By Manuel Lemos Many sites present content for adults. Those sites need to confirm if the users have 18 years of age or more.
This package provides a solution to present a confirmation dialog to request that the user confirm if they are adults.
When the users confirm their age, the site uses encrypted cookies to store the user response, so it no longer shows the adult confirmation dialog.
This way, this package helps adult site content owners comply with countries' laws that require that the sites restrict access to content to adult users.
How to Quickly Implement a PHP Sales Management in a Web Site without Using a Database By Manuel Lemos Many sites implement an e-commerce section where the site owners can sell a set of products to their customers.
Implementing a complete e-commerce system can be a very complex task that requires to setup a database on which the site lists the available products.
This package provides a more straightforward solution: site owners can implement a sales system using simple configuration files.
How to Use a PHP Code Check to Measure the Aspects that You Need to Change to Improve Your Code Quality By Manuel Lemos You can measure the quality of a developer's code in several ways. For instance, complex code may be hard to maintain.
If you write complex code, it would be good if you could improve the way you write your code to make it less complicated.
Measuring the complexity and other aspects of the quality of your code can be helpful for you to have an idea of how good is the code you write and what parts you need to improve.
This package combines several other packages that measure different aspects of your code and generate a report that you can analyze and discover opportunities to make your code better.
Find MySQL Slow Queries by Activating the Slow Query Log - 7 minutes - Lately in PHP Podcast Episode 93 Part 1 By Manuel Lemos One of the factors that may make a Web application slow is the speed of execution of database queries executed by the application back-end code.
If you optimize the database queries that are the slowest, it may make a lot of impact on the speed of an application.
The first step in optimizing the slowest database queries is to find which are the slowest queries. Using MySQL as the database server, you can find the slowest queries by activating the slow query log.
Read this article, watch a 7-minute video, or listen to part 1 of episode 93 of the Lately in PHP podcast to learn how to enable the MySQL slow query log.
How to Use a PHP Instagram Client that Can Retrieve Instragram User Details without Using the Instagram API By Manuel Lemos Instagram is a prevalent social network on which people can post their content, mainly using pictures and videos.
Applications can retrieve information about Instagram users using its API and the OAuth protocol.
This package provides a simpler alternative to retrieve several types of Instagram user details that do not require using the Instagram API and the OAuth protocol.
The package accesses the Instagram pages and extracts several types of user details from the Instagram user pages HTML.
How to Use a PHP MySQL Diagram Generator to View the Schema of Tables of a MySQL Database By Manuel Lemos MySQL is a popular database system used by many developers of many different languages.
Sometimes developers need to have a good view of the current version of a database table schema they are using in their applications to understand the data that the applications can store in the database, so they can figure better how to implement the new features of their applications.
This package provides a way to generate diagram images of a MySQL database schema from a command line interface console.
How to Implement a PHP Health Check Solution Calculating Different Factors of the Health of a Person By Manuel Lemos People must keep track of their health when they want a good quality of life.
There are many aspects of a person's health to consider. Usually, it all starts by having an appointment with a doctor.
That doctor will probably ask you to do a set of health exams, so he can check what aspects of your health you need to improve.
After doing those exams, it is helpful to keep track of the result values, so you can repeat those exams later and compare whether you evolved in those health aspects.
To evaluate your health, you need to perform calculations with the values of the results of several exams.
This package provides a way to calculate many types of health factors so you can
How to Create New Laravel Nova Fields to Create Administration Panels with Less Effort By Manuel Lemos Laravel Nova is an administration panel built using Laravel.
Developers can extend it with additional components that provide better features and new panel elements.
This package can simplify the generation of the output of a Laravel Nova panel element.
It can help reduce the code that Laravel Nova panel elements need to write to generate the output that defines how each panel element appears to the users.
How to Implement a PHP Products Search that Can Return Recommended Products for Tourists to Buy When They are in Given City By Manuel Lemos Many people like to do tourism travel to places that they don't know. When in those places, they want to buy products that probably only exist because of the weather and bring souvenirs.
This package provides an API that can return recommendations for products to buy in a given city the according to the current weather conditions.
These features help implement applications for the tourism market.
How to Define PHP Routes for HTTP Requests using PHP 8 Attributes to Extract Details from Routing Class Code By Manuel Lemos PHP 8 implements the possibility to extract attributes defined in comments of PHP classes using PHP reflection support.
This package uses this possibility to implement an MVC framework that developers can use to configure HTTP request routes using route classes that comment attributes that define the details of the routing of HTTP requests to controller classes.
This way, developers can define the PHP application HTTP request routing configuration in the same class file that implements the routing code.
This possibility makes it easier to maintain complex PHP applications because it avoids the need to define routing PHP code in a separate file from the routing configuration.
How Can PHP Sign PDF Documents Using Certificates that Allow the People that Will Receive the Documents to Verify their Authenticity By Manuel Lemos PDF is a popular format for generating documents that users can view or print.
Anybody can alter a PDF document using editing tools. In some cases, the original author does not want that the document is changed.
Certificates can be used by the PDF document author to digitally sign a document to assure that the original document is intact when the users view it.
The PDF document viewer programs can check the digital signature contained in a document to verify if it is still intact.
This package provides a pure PHP solution to sign existing PDF documents with x509 digital signatures.
How to Improve Your Productivity Using Laravel Macro to Build Forms that Have Complex Select Inputs By Manuel Lemos A macro is an abbreviated form to represent information that may be long.
Macros can help save time for developers that need to write code for the different parts of their applications.
This package provides an example of how to use macros in Laravel applications by showing how to create a macro class that generates HTML for options of a form select input that has many options, for instance, a list of supported banks.
This macro class can save a lot of time for developers that need to insert the same type of form select input in the output of their applications' Laravel view templates.
How to Implement a PHP Hash Generator That is Simple Fast in Pure PHP By Manuel Lemos Hashing is an operation that computes a value from a string of data.
Hashing operations help check the integrity of data that may be transmitted between a source computer and a destination computer to detect data transmission failures caused by external interferences.
In environments in which security is an important aspect, developers should use cryptographic hashing algorithms to detect malicious alteration of data by people with bad intentions.
In environments where security is not essential due to the low risk of alteration of data by bad-intentioned people, developers can use non-cryptographic algorithms.
Such algorithms do not require so much CPU processing power and can run faster.
Murmurhash is a non-cryptographic algorithm.
This package provides a pure PHP implementation of the Murmurhash algorithm. Therefore it does not require that particular cryptography PHP extensions are available to use this class.
How to Set or Get the PHP Types of Variables Without the Risk of Committing a Mistake When You Type the Variable Type Names By Manuel Lemos PHP is a weakly typed language. This fact means that it allows setting the type of variable values when executing the PHP code.
Although this makes the PHP language very flexible and tolerant of the developer's mistakes, sometimes it can be hard to debug subtle bugs caused by the developer's errors.
In practice, that can mean that developers may take more time to fix subtle bugs that probably would not exist if PHP was a strongly typed language.
This package provides a solution that can help to avoid those bugs. It gives the name strings of the PHP variable types.
So, if a developer wants to use the PHP GetType and SetType functions to get or set the variable type, the developer can use this class.
So, if the developer makes a mistake in the name of a constant provided by the class, PHP will trigger an error that can make it easier to find bugs caused by typing the name of a PHP type.
PHP MVC Routing Tutorial with a Practical Example By Aladdin As you may know, MVC is a popular design pattern implemented by many PHP frameworks and applications.
Usually, MVC frameworks have a router component that processes HTTP requests and forwards each request to the controller class or callback function configured by the application to handle the request and generate the HTTP response.
Read this short tutorial to learn how to implement MVC routing using the Router App package quickly.
How to Create a Laravel Blog Project that Uses Markdown as Format to Write the Blog Posts By Manuel Lemos Blogs are still a popular form of publishing content of interest to a given community.
HTML is a natural format for defining blog content because Web pages use HTML to determine the page contents.
However, certain HTML tags may be insecure to allow blog post authors to submit content because a malicious author may use specific tags to steal private information from blog visitors.
Markdown is not as powerful as HTML in rendering content, but it is undoubtedly more secure because it does not support the same kind of tags HTML supports and can be insecure.
This package implements a blog system that allows authors to edit the post content in Markdown format, and then it displays that content on Web pages using regular HTML.
How to Simplify Your PHP Code by Performing a PHP Complexity Analisis to Find PHP Functions with Too Many Arguments By Manuel Lemos Complex PHP code is hard to maintain. In practice, if you use a complex coding style, you spend a lot of time analyzing and improving your code whenever you need to make changes.
There are several types of signs that you use a complex coding style. One of them is the way you declare your classes and functions.
For instance, if you create classes with functions with many parameters, that is a sign that you are trying to do many operations in those functions.
This package can help you to find which can be complex class functions, so you can fix them, probably splitting them into several tasks that do fewer operations.
How to Help Your Blog Users to Decide If They Want to Read a Post Based on The Author Feelings Using a WordPress Plugin for Sentiment Analysis By Manuel Lemos People who send text content to the Internet often express how they feel. That is the case, for instance, when post articles on a blog.
Knowing the kind of sentiment that an author of an article is expressing can be helpful for site users to decide if they would like to read the article or not, depending on the current mood.
It may also be helpful for site moderators to decide if they should approve an article or not, depending on whether the sentiment expressed by the article author is positive or negative.
This package implements a WordPress plugin that can analyze the sentiments expressed by authors of posts, pages, and comments. This way, users and moderators may understand the author's feelings.
How Can PHP Measure the Execution Time of a Web Script Since the HTTP Request Start By Manuel Lemos Measuring the time a PHP script takes to execute allows determining if a hand is too slow and if its performance needs to be optimized.
When PHP is used to serve Web pages, the execution time must be measured from when the Web server received the HTTP request.
This package provides a class that can calculate the current script's real execution time considering the HTTP request start time.
How Can PHP Allow IP Address Range of Real Users by Blocking Machines Used to Perform Security Attacks By Manuel Lemos Sometimes Web servers that run PHP sites are attacked by several machines hosted in the same network.
One way to protect against those attacks from all those machines is to block network connections from the whole IP address range segment.
This package simplifies blocking a whole IP address range segment by generating commands to run the Linux iptables command that adds rules to stop all the IP addresses that belong to those range segments.
How to Use PHP Validation Type Casting to Perform Complex Form Validation with Less Code By Manuel Lemos Many Web applications need to validate values entered by the users to avoid invalid values that can make the application work unexpectedly.
Usually, developers define a set of rules to validate values entered by users. In some cases, specific values need to be validate by several rules.
This package supports the concept of type casting. This concept allows the definition of rules that combine several other rules into a single rule.
This way, developers can simplify the definition of complex rules in less code than if they had to define all simple rules for each value that their applications need to validate.
How to Discover The Reasons Why Your Application Slowest Parts Are So Slow By Manuel Lemos When you discover what parts of your applications are the slowest, you are in an excellent position to start making changes in your code that can significantly impact the application's performance.
Still, you need to understand why that code is so slow, so you can make the right changes to make the code run much faster. This article has some example code to show how to do it manually.
Going through a large section of code and finding the exact lines of slow code can take too much time.
A good profiling tool can help you find the exact lines of code that make the code so slow, so you can quickly determine why the code section is so slow.
Please read this short article to learn how to use the Scout Application Performance Monitoring tool to determine the specific lines of code of a Laravel or Symfony application that are causing the application to be so slow, so you can focus your optimization work on the code changes that really can make a difference after you optimize the code.
How to Quickly Create Extensions to Work as Joomla Templates By Manuel Lemos Joomla is a popular PHP content management system many sites use to publish helpful content.
Developers can extend Joomla with additional modules that provide other functionality.
One of the types of modules that Joomla supports is template extensions that developers can install to change how a Joomla-based site appears to the users.
This package generates the files for creating Joomla template extension modules.
This way, Joomla extension developers can get started faster when they want to create new template modules.
How to Implement a PHP JPEG Exif Data Editor to Read and Write JPEG Image Captions in Multiple Languages By Claude Diderich If you are doing development work for clients whose native language is not English, you probably have been challenged to write IPTC-IM (International Press Telecommunications Council Image Metadata) that you can embed in JPEG image files with information like headlines, captions, keywords, etc.
You can embed that metadata information in JPEG image files in different languages. The challenge worsens if you want to offer the same images to different clients speaking or publishing in other languages.
Read this article to learn how to read and write IPTC-IM metadata in JPEG image files using PHP.
How to Implement a Simplified PHP Login System with Admin Features and User Registration in a Single Script By Manuel Lemos All sites that have registered users implement a system to create and manage user records and user login sessions.
This package provides a simple solution that application developers can quickly adapt to any site regardless of how it stores and retrieves the user records.
It provides a single class that applications can use to handle access to most types of pages that the applications will use to handle user registration, login, administration, etc.
How to Load PHP DotEnv Multiple Files by Finding the Correct Path for the Files Depending on the Current HTTP Request Site Host By Manuel Lemos dotenv is a popular format used by many developers to store configuration values.
It is language-independent, so applications written in different languages can easily read the files in that format.
Usually, dotenv files exist in a fixed location relative to the path of a project.
If you have multiple projects, you may need to find the path of the dotenv file to load the correct configuration file.
This package can test different paths and find the correct location based on a list of possible setups for your projects and the current HTTP host.
How to Implement a PHP Telegram Bot that Can Provide a Graphic User Interface to Interact with Chat Users By Manuel Lemos Telegram is a well-known chat application that provides an API to build powerful bot applications. Those bot applications can interact with users automatically.
Some Telegram features allow users to answer questions using buttons or typing text using only specific keyboard characters.
This package takes advantage of the Telegram features to quickly implement more user-friendly chatbot applications written in PHP.
How to Discover What PHP Code You Should Optimize First to Improve the Performance of a Real Web Application Using a Monitoring Tool By Manuel Lemos A profiling tool can be handy to find the parts of your application code that are slow and that you need to optimize.
If there are many parts of your application that you need to optimize, the next decision is which parts you should work to optimize first.
Fortunately, some profiling tools can help you figure out which parts of your application you need to optimize first.
Please read this short article to learn how to use the Scout Application Performance Monitoring tool to determine which parts of a Laravel or Symfony application you should optimize to achieve the most significant performance improvements sooner.
How to Write a Google Search Query Using PHP By Manuel Lemos Many people use Google as a prevalent search engine due to its ability to present results about pages that are available on the Web.
Google provides a way to query the search engine using text strings that support a powerful syntax to restrict the search results to pages that can match complex conditions.
This package provides a more straightforward way to compose Google search query strings by providing a set of functions that PHP developers can use without understanding Google search query syntax.
How to Implement a PHP JPEG Exif Data Parser and Writer To Read and Write the Image Description Text in Different Languages By Manuel Lemos JPEG is a popular image format that can store high-quality data using compression to reduce the image file.
JPEG may contain metadata that describes aspects of the image.
This package can read or write image metadata that JPEG image files contain with support to store text metadata in different languages.
This way, the package can help develop applications that display metadata information in different languages that application users understand.
How to Use a PHP Application Profiling Tool to Determine What You Should Optimize First to Improve the Performance of a Laravel or Symfony Application Performance By Manuel Lemos Many experienced developers have learned how to improve their coding habits to write code that will run faster.
If you have already written an application, it may be tough to determine if you have already registered the code in a way optimized to run at the highest speed.
Fortunately, some tools can help you figure out which parts of your applications are worth the effort of optimizing to achieve speed improvements.
Please read this short article to learn how to use the Scout Application Performance Monitoring tool to determine which parts of a Laravel or Symfony application are worth optimizing and how to use the Scout application tool for free, so you can see it in action without paying.
How to Make Laravel DebugBar Enable Dynamically So You Inspect Debugging Values in Specific Situations of Your Interest By Manuel Lemos PHP DebugBar is a package that is useful for debugging PHP applications. At the bottom of the current page, it can show several types of debugging information about the execution of the PHP script handling the recent HTTP requests.
Laravel DebugBar is a package that turns the PHP DebugBar package into a service that Laravel applications can use.
When developers debug an application, they may not need to show debugging information in all circumstances.
This package only provides the means to enable the debug bar in the Laravel application only in certain circumstances that are useful for the developer who is debugging a Laravel application.
How to Create a PHP Database Connection Test Script to Check the Database Server Reachability By Manuel Lemos How to Create a PHP Database Connection Test Script to Check the Database Server Reachability
Many PHP applications need to access a database server and execute SQL queries to store and retrieve data in database table records.
If for some reason, the database server is not available for connection, any queries that the applications need to execute will fail with an error that may not be very clear what is the real cause.
This package provides a simple solution to check the availability of the database server.
It executes a dummy SQL query that is not useful for storing and retrieving data from the database server.
It only serves the purpose of checking if the database server is accessible.
How to Create a Chat Party with a PHP Telegram Bot By Manuel Lemos Telegram is a popular chat application that can be improved using external applications that call Telegram API to implement new resources around the Telegram application.
One popular type of Telegram-based external application is well-known for using Telegram support to implement chatbots that can interact with many users.
This package implements a chatbot that can create a party at which each user can invite other users to participate in a chat party.
How to Implement Laravel Privacy Measures to Only Set Cookies After the User Authorizes the Use of Cookies By Manuel Lemos Many sites are now asking users if they can use cookies to track users that visit a site.
This request implementation usually works by showing a message on a page with a button that the users can click to tell the site they can use cookies.
This package implements a solution for this approach that will work in Laravel applications.
Laravel 9 Tutorial to Implement a CRUD Application Taking Advantage of PHP 8 Features By Manuel Lemos Laravel is a well-known PHP development framework. In version 9, it introduced new improvements, including taking advantage of PHP 8 new features.
This package implements an example of a CRUD application based on Laravel 9.
How to use PHP to Detect File Type From Path By wim niemans Some applications need to determine the type of file to do specific file processing for each file, like processing image files.
The Metyl PHP MIME Type Check package can simplify that task by detecting the MIME type and encoding of the data, as well if the usual file name extension is one of the extensions allowed by your PHP application.
Read this short PHP tutorial to quickly learn how to use the Metyl PHP MIME Type Check package to detect the correct file type.
How to Implement Your Own PHP Analytics Dashboard in a Site Using the Melis Content Management System By Manuel Lemos Most site owners are interested to know how their sites are doing in access statistics, so they can figure out how to improve the areas to make them attack more users.
Many sites use external analytics tools like, for instance, Google Analytics.
If, for some reason, the site owners prefer to avoid using external analytics tools, the package can provide a good alternative.
This package provides a page analytics module for sites that use the Melis PHP content management system.
Using the Melis CMS with this module, sites do not need to use any other external site access statistics to track how the sites are doing in terms of users that visit the sites.
How to Update PHP Version Using Methods and Tools the PHP Community Uses - 3 minutes - Lately in PHP Podcast Episode 92 Part 10 By Manuel Lemos Every time you need to solve a problem, you may realize there may be several approaches to solve that problem. Each way has its advantages and disadvantages.
This fact shows why it is helpful to learn from other developers what approach they use to solve a problem that you also want to solve.
Read this article, watch a 3-minute video, or listen to part 10 of episode 92 of the Lately in PHP podcast to learn about other methods and tools different developers use to upgrade PHP versions.
How to Implement a PHP Chess Game as Part of a Symfony Application By Manuel Lemos Chess is a popular board that many people that like challenges like to play.
Symfony is a popular framework that may PHP developers use to develop their application.
This package combines the features of chess game manager in a way that it is easy to implement chess game in Web site developed using the PHP Symfony framework.
How to Optimize the Performance of a Real Web Application with a Monitoring Tool By Manuel Lemos Many experienced developers have learned how to improve their coding habits to write code that will run faster.
If you have already written an application, it may be tough to determine if you have already written the code in a way optimized to run at the highest speed.
Fortunately, some tools can help you figure out which parts of your applications are worth the effort of optimizing to achieve speed improvements.
Read this short article to learn how to use the Scout Application Performance Monitoring tool to determine which parts of a Laravel or Symfony application are worth optimizing.
How to Implement a PHP Template Engine to Generate HTML Pages that Can Adjust the Path of JavaScript, Images and CSS Relatively to the Current HTTP Request URL By Manuel Lemos Processing templates is a common task that many PHP applications perform to generate the output, for instance, of each page.
In some cases, HTML templates may contain the paths of the URLs of JavaScript, images, and CSS files.
When these files use relative paths for these files, the correct path depends on the path of the current PHP script page URL.
The correct relative path may vary if the page URLs are inside each server directory.
This package implements an approach to simplify this situation. It can take a parameter that applications may use to specify the relative depth of external files that the current page uses.
How to Implement a PHP JWT Token Generator that Can Be Used in Security Protocols like OAuth By Manuel Lemos JSON Web Token (JWT) is a standard for encoding and transmitting security-sensitive information using JSON format to encode objects as strings.
This class provides a simple means to encode and decode data using the JWT standard.
Developers can use this class with other components that implement more complex protocols and security measures, like OAuth.
How to Implement a PHP Payroll System To Management Payments for People that Work with Schools By Manuel Lemos Payroll systems are helpful to many businesses that need to keep track of the payments that their customers have made.
One type of business that usually can make good use of a payroll system is a school.
This package implements a payroll system dedicated to school business.
How to Implement a PHP Version Check that Tolerates the Variations of the Version String Formats By Manuel Lemos Many software projects use a convention to number the project version numbers called semver.
This conversion splits the version numbers into three parts: major version, minor version, and patch number.
This possibility helps developers determine if their current version is more recent or older than some other version.
This package parses version string numbers in a way that tolerates variations like putting a v in the front of the version, using needless zero characters before the version number parts, or even missing minor or patch numbers.
It can also normalize the version number strings to comply more with the semver convention.
How to Generate a PHP Template Class to Render Views in CodeIgniter Applications By Manuel Lemos Many PHP applications use MVC frameworks like CodeIgniter and others to develop faster the application code using existing class libraries.
Rendering the output of a page is a common task that most applications need to perform.
Often this task is performed using templates that are processed to create the page output.
The package provides a viewer class that simplifies the development of PHP applications that use the CodeIgniter framework to render the current request output using a given template PHP script.
How Can PHP Load JavaScript of Web Pages Faster using a Template Engine to Combine JavaScript Files By Manuel Lemos Every site needs to use JavaScript code to implement features of Web pages that require dynamic changes.
The list of JavaScript files that may be necessary to load on a Web page may be longer depending on the kind of features developers want to provide, and it may be tedious to specify each file in the page HTML.
This package provides an alternative method for loading JavaScript all at once.
It uses its template engine to combine all the necessary JavaScript libraries in a single JavaScript and stores it in a cache file to make it faster by avoiding processing the JavaScript template again.
How to Debug CodeIgniter Faster using Zend Z-Ray Integration By Manuel Lemos CodeIgniter is a popular PHP framework used by many PHP developers.
Z-Ray is a product from the Zend company that can help developers debug their applications faster.
The package integrates a CodeIgniter plugin package that can help view CodeIgniter application-specific details using the Z-Ray product.
How to Execute SQL Query Statements Configured in Separate Files That Help Maintaining Your PHP Application Easier By Manuel Lemos Most PHP applications need to connect to a database and execute SQL queries to store and retrieve data.
Usually, developers define the SQL queries as strings in the PHP code that performs those queries when executed.
If you need to update the queries to improve the features, you must change the PHP code that defines those queries.
This package provides a different alternative to define the queries that the PHP code of your applications needs to execute.
It allows defining the queries in the PHP configuration scripts that define the SQL queries as named constants.
This approach allows developers to find the queries they need to update faster when they want to improve their application features.
This approach also makes application maintenance easier because the developers may only need to change configuration files defined separately from the application code.
How Can PHP Detect CLI or Web Environment on Which It Is Running By Manuel Lemos PHP is a flexible language that can run in different environments, for instance, a Web server or a command-line interface shell console.
Developers can create applications that adapt to the different environments in which PHP may run.
This package helps developers who want to adapt to PHP's different environments.
It checks some environment values and returns the information of the specific environment in which it runs.
Using this package, developers only need to adapt their code depending on the environment type that this package returns.
How to Use a PHP Monitoring System with Email Notification to Verify a Version Upgrade - 3 minutes - Lately in PHP Podcast Episode 92 Part 9 By Manuel Lemos When you make changes to a site or another aspect of your site production environment, there is always a chance that some parts may not work well after you complete the changes due to unexpected consequences.
Often these consequences cause your site's PHP code to trigger errors. These errors may start appearing after you do a PHP version upgrade.
One way to determine if there were errors after you made production environment changes is to monitor PHP errors and send emails for the new PHP errors that started to appear.
Read this article, watch a 3-minute video, or listen to part 9 of episode 92 of the Lately in PHP podcast to learn how to monitor your PHP errors quickly and be notified by email, so you can fix the environment that causes the errors.
How Can PHP Search MySQL Table Fields with Large Text Fields Using the MySQL FIND_IN_SET Function By Manuel Lemos Many PHP developers use MySQL as a database to store application information dynamically.
PHP developers often need to perform search queries to filter the database table records with field values matching given criteria. Sometimes there is the need to filter records that match multiple criteria.
SQL allows composing complex search queries to combine multiple search criteria.
MySQL has a particular function named FIND_IN_SET that allows defining a condition that can check if string values have a given number of occurrences of another string value.
This class allows composing complex MySQL search queries that combine multiple search conditions. Some conditions can use the FIND_IN_SET function to find database table records with particular values in larger text fields.
This possibility allows PHP developers to perform complex searches to find given text values inside database table field values that have text values the PHP application users want to see.
How to Implement a PHP Inventory Management Dashboard Using a Laravel Integration with Rackbeat By Manuel Lemos Rackbeat is a Web-based service that customers can use to help them manage the inventory in their warehouse places.
It can manage inventory jobs that are going on in a customer warehouse.
This package can help site owners who are Rackbeat customers quickly see the ongoing jobs in their Rackbeat account in one place on their site.
The package implements a Rackbeat jobs dashboard that developers can add to a site built with Laravel.
The Right Order to Execute the Steps to Upgrade to a New PHP Version - 2 minutes - Lately in PHP Podcast Episode 92 Part 7 By Manuel Lemos One of the reasons why certain version upgrades went wrong is that you do the version upgrade process steps in the incorrect order.
You can determine the correct order by the more critical steps you need to do first because you can only do the following steps when you complete the crucial steps.
Read this article, watch a 2-minute video, or listen to part 7 of episode 92 of the Lately in PHP podcast to learn the correct order of the steps to perform a PHP version upgrade.
How to Implement a Laravel OAuth2 Server API that Can Refresh Expired OAuth Tokens Automatically By Manuel Lemos Laravel Passport is a package intended to provide user authentication for APIs using the OAuth 2 protocol.
An OAuth 2-based API server can generate tokens for the API clients to access the API on behalf of a real human user who authorizes the access to the API services from API client programs.
An OAuth 2 server can generate access tokens that it returns to the API client program. In the subsequent request that the client program sends to the API server, the client only needs to pass a token value to authenticate on behalf of the same user.
API servers should renew the access tokens after some time to improve the security of the API access.
This package provides a service that can perform the renewal of access tokens using refresh tokens by following the procedure determined by the OAuth 2 protocol specification.
This package can make the OAuth 2-based APIs based on the Laravel Passport more secure.
How to Use a Laravel Livewire Select Input That Can be Updated Interactively Communicating with the Web Server Using AJAX Requests By Manuel Lemos Laravel Livewire is a framework built on top of the Laravel framework that makes it easier to develop Web applications that provide Web interfaces that can change dynamically.
It supports components that can change the Web interface after interacting with the Web server using AJAX requests.
This component can interact with a Web server after the user picks options in a form select input.
How to Get Easy to Understand PHP Performance Metrics to Quickly Improve Your PHP Application Performance By Manuel Lemos Measuring the performance of an application is a complex subject. You need to learn many aspects so you can determine how to measure the performance values, so you can make good decisions on what you can do to change your application code, to make your code run faster in a way that is noticeable by the application users.
Visual tools can help you as an application developer to view and interpret the current performance values, so you can compare those values before and after you make code changes, so you can confirm that your application will really run faster after you make those code changes.
Read this short article to learn more about how to visualize the performance values of your Laravel or Symfony applications any time you want using the Scout APM tool for free.
How to Use a PHP Validation Library that Extracts Validation Rules Automatically from PHP Validation Source Code Files By Manuel Lemos Validation of data retrieved from external sources like the user input is mandatory in any robust PHP application.
There are many approaches to validating external data.
This package provides an alternative that simplifies the validation process of data passed to classes of objects or returned by those objects.
It uses PHP reflection to minimize the amount of PHP code necessary to validate data passed to classes of objects.
This way, developers reduce the effort to implement robust validation in their PHP applications.
How to Implement a PHP Template Engine For Processing Complex Templates Using Multiple Template Processing Objects By Manuel Lemos PHP is often used to process templates that will define the presentation of Web pages.
In some cases, pages can present the content complexly that involves nested sections because they contain internal parts.
The package provides a template engine that can deal with this complexity.
It allows assigning template marks with content resulting from processing other templates by other objects of the template classes provided by this package.
This way, developers simplify complex template processing by splitting the processing between different objects that can process inner parts of the page using multiple template processing objects.
How Can PHP Parse JSON Data from a Post Request in a Secure Way to Avoid Hash DoS Attacks By Manuel Lemos A Hash DoS attack is a security attack that may affect PHP applications that use arrays or objects to pass parameters from clients to PHP using HTTP request variables.
This vulnerability may affect PHP versions that do not avoid collisions of hash data structures that may take many keys that result in the same hash value to determine how PHP's arrays and objects are stored internally.
PHP provides better alternative methods to store arrays and objects more immune to this vulnerability.
This package implements a parser for JSON strings that uses an alternative method to store values or JSON objects passed to PHP from HTTP requests like those used to call APIs implemented in PHP.
How to Implement a Student Management System to Help Students Plan Their Studies Better By Manuel Lemos A successful student needs to be prepared to show that he learned what he is supposed to learn from his teachers.
Usually, an exam presents exercises that the students need to do to prove they learned what teachers expect them to know.
When students have a limited period to study and be prepared to do the exam, they should plan better their studying efforts so they prepare themselves in time for the exam date.
The package provides an API that can generate a study plan with the times and chapters the students need to go through to practice what they learn and pass the exam.
How to Use a PHP Stock Management System to Keep Track of the Groceries that You Have at Home or Need to Buy By Manuel Lemos Many people need to manage the stock of groceries and other products in their homes to consume.
This way, they can determine when it is necessary to buy more products running out of stock.
This package provides an application that lets them manage the stock of products they consume at home using either a Web interface, an API from a mobile application, or the command line console.
How to Implement an Asynchronous PHP Data Objects Using Swoole to Store and Retrieve Objects Faster By Manuel Lemos Swoole is an Open Source project that allows developers to create PHP applications that can execute operations asynchronously and quickly.
This way, applications can execute multiple operations simultaneously in parallel, so a single PHP script can run in less time than the same script would execute using the regular PHP implementation.
This package uses Swoole speed optimization to implement a client that can store objects in a storage container managed by a server executed using Swoole.
This package can store and retrieve data objects faster than using traditional types of databases used by PHP developers that require clients to wait until the database access queries finish before the PHP scripts move to execute the next operation in the same PHP script.
How to Create a Memes PHP Script to Generate Funny Images using a PHP Class By Manuel Lemos A meme is a way to propagate a situation that often is funny. Funny images usually represent a Meme that describes that situation.
This package can generate meme images from base images and funny texts.
This way, you can generate lovely mime images that others may consider funny and like you more for making them enjoy the comical situation and become happier.
How to Use PHP Eloquent Model Classes in PHP Applications that Use the CodeIgniter Framework By Manuel Lemos CodeIgniter is a popular PHP framework used by many developers to implement PHP applications following a consistent development method.
Eloquent ORM is a PHP package that can map model classes to database table records to store application data objects.
Often the Eloquent ORM is used in PHP applications that use the Laravel framework.
This package demonstrates that PHP developers can learn how to use the Eloquent ORM model class objects in a CodeIgniter application.
How You Can Debug PHP Online Using a Web Page and without Installing Server Side Extensions By Manuel Lemos Most PHP developers need to debug their code as part of the development work to ensure it works well as expected.
PHP provides debugging functions that have limited capabilities.
There are alternative solutions based on PHP extensions that are hard to install and often required to alter the security protections to debug PHP applications running on production servers.
They often require special effort to integrate with IDE tools that support PHP.
This package provides a better alternative that allows developers to debug their PHP applications.
It allows developers to insert a few lines of code in the PHP applications that they want to debug.
Then developers can access a Web server that provides a user-friendly interface to control the PHP application they want to debug.
How to Find Slow Requests Using a PHP Performance Monitoring Tool with Laravel or Symfony Applications By Manuel Lemos If you have a site and you notice that it is slow, that is an issue that may affect the user experience, and users may leave the site for that reason.
To solve the slowness problem, first, you need to find the causes that make the site slow before you can start fixing the performance issues.
Read this short article to learn more about how to find and fix slow requests served in your Laravel or Symfony applications using the Scout APM tool for free.
How to Extract PHP HTTP Request Variables to Pass to a Controller using a Router Class that Extracts Many Types of Values By Manuel Lemos PHP provides super-global variables to facilitate access to the values extracted from the current HTTP request.
Nowadays, many applications use router components that can parse the HTTP request to configure which controller class handles the HTTP request.
This package combines the features of PHP to extract HTTP request values with the quality of the Mezon router class to retrieve HTTP request values and route parameter values using the same code.
How to Use a PHP Performance Monitoring Tool to Solve N+1 Queries Problem in Laravel or Symfony Applications By Manuel Lemos Many PHP applications use an Object-Relational Mapping (ORM) approach to store and retrieve application objects using SQL to query relational databases.
N+1 Queries is the problem many applications have with using traditional approaches to implement Object-Relational Mapping (ORM). These approaches may cause performance loss if the developers still need to fix the application code to avoid this problem.
Read this short article to learn more about N+1 queries and how to find and fix performance issues caused by these queries in your Laravel or Symfony applications using the Scout APM tool for free.
How to Implement a PHP Darts Count to Help Darts Game Players to Keep Track of the Game Score By Manuel Lemos Darts is a popular game that allows several people to play by throwing dart arrows at a target board. Each player can earn points depending on how close the hands stick to the center of the board.
This package can help manage each player's score until each game ends to determine who won.
This way, the package can help keep track of the game's progress accurately, so the players do not have to remember how many points each player is scoring.
How to Test Your Application Features in Practice During a PHP Version Upgrade - 4 minutes - Lately in PHP Podcast Episode 92 Part 6 By Manuel Lemos After you have planned all the steps of a PHP version upgrade process, it is time to execute the planned steps.
Read this article, watch a 4-minute video, or listen to part 6 of episode 92 of the Lately in PHP podcast to learn how to test your application features in practice during a PHP version upgrade using reliable testing tools.
How to Use PHP Code to Generate Excel Report Pages in a Site Using a Joomla CMS Plugin By Manuel Lemos Joomla is a popular content management system (CMS) written in PHP. Developers can extend it with plugins that make it more useful for sites that publish content using the Joomla system.
This package provides an example of a plugin for the Joomla CMS that can show how to create plugins in practice. It shows how to extract data from Microsoft Excel files and display it as a report on a Web page managed by Joomla.
How to Implement a Process of Automated Testing of PHP Web Applications Controlling a Browser using PHP from the Console By Manuel Lemos The best way to test a Web application is to do human testing.
Human testing means that a natural person uses a browser to access the Web application pages. It is possible to confirm that the user performs the desired actions in the application.
Sometimes it is convenient to automate the tests making the current user access the same page again. So the user would need to tell the browser to reload the current page.
This package provides a means to automate the browser reloading process by emulating the user's input to make the browser reload the current page without having a natural person interacting with the browser application.
How to Make More Money from Exchanging Currencies using a PHP Currency Converter Commission Calculator Class By Manuel Lemos Many people work in the currency exchange market, trading money amounts between different currencies.
Each exchange transaction has associated commissions paid to the dealers that perform the transaction.
This package can automate the calculations of the commission amounts involved in a set of currency exchange transactions.
How to Implement a PHP CDN File Syncronization Solution to Serve Static Files Faster in CakePHP Applications By Manuel Lemos A Content Delivery Network (CDN) is a service that allows off-loading the service of pages and other Web site resources to a network of third-party servers.
Those servers can be geographically closer to the users of a site, thus making the service of those site pages faster for those users.
This package can perform several operations to store and retrieve files stored in CDN servers directly. It makes it easier for developers to manage content stored in CDN servers from the Web sites they developed.
How to Use a PHP API Generator to Quickly Create a Web Services that Responds with Database Query Results By Manuel Lemos Web services often need to store and retrieve data from SQL databases.
Web service clients pass parameters that the Web service providers need to process to perform the operations controlled by the parameter values sent by the Web service clients.
This package simplifies using the parameter values passed by Web service clients and executing prepared queries by automatically assigning query values to the parameter values passed to Web service.
What Are Your App Features to Test First Before a PHP Version Upgrade - 3 minutes - Lately in PHP Podcast Episode 92 Part 5 By Manuel Lemos Testing a PHP application may require that you test a lot of features. Therefore you need to define the order of the features that you will test.
First, you need to define the most critical features of your PHP application to verify if they are working as expected early on in the testing process.
Read this article, watch a 3-minute video, or listen to part 5 of episode 92 of the Lately in PHP podcast to learn how to determine which are the most critical features you should test first during a PHP version upgrade testing process.
How to Make Your Laravel or Symfony PHP Applications Faster Using the Scout APM Tool for Free to Discover Optimization Opportunities By Manuel Lemos The performance of your PHP applications is now more critical than ever before because the user experience has become an even more crucial factor in determining the quality of Web sites and applications.
Slow applications may lose visitors coming from search engines like Google because it considers performance one of the most critical factors in evaluating the user experience of Web sites and applications.
Read this short article to learn how to find and fix performance issues faster in your Laravel or Symfony applications using the Scout APM tool for free.
How to Quickly Create a Laravel API Application Using Routes Generated from an OpenAPI Specification By Manuel Lemos OpenAPI is a standard that defines a file format that uses JSON to describe the functionality of an API.
Developers that want to use OpenAPI to implement an API need to parse the API specification in JSON format and write code that implements the functions of each API endpoint.
This package makes it easier for Laravel developers to implement APIs based on the OpenAPI specification. It can process an OpenAPI specification to add routes for the API endpoints.
This way, the developers only need to develop the code for the action controllers of each API endpoint.
How to Setup a Development Environment to Test a PHP Version Upgrade - 3 minutes - Lately in PHP Podcast Episode 92 Part 4 By Manuel Lemos The first thing you need to do to start an upgrade of a PHP version is to set up a development environment where you can test if your application continues to work well with the new PHP version.
Read this article, watch a 3-minute video, or listen to part 4 of episode 92 of the Lately in PHP podcast to learn how to set up a machine to test if your PHP applications work as expected after the PHP upgrade version.
How to Implement a Laravel Elasticsearch Solution to Scale PHP Applications with Search Features By Manuel Lemos ElasticSearch is an application to index and efficiently search content.
It provides a server that PHP applications can connect to perform searches from separate machines. This possibility allows for the development of more scalable applications.
This package provides an example of setting up a Docker container of a Laravel application that developers can use to learn how to create applications that can run on multiple servers.
How to Create Fast and Intuitive User Interfaces using a Laravel Command Palette to Let Users Execute Application Functions Very Quickly By Manuel Lemos Command palettes are user interface widgets that allow the users to have quick access to a list of commands that they can execute in an application.
Users may click on command buttons or type the command's name they wish to execute.
This package implements command palettes to send the command execution requests to the server-side application using AJAX requests to avoid page reloading.
This package implements an API based on the Laravel framework to process the command execution requests that it receives from the browser via AJAX.
How to Plan a PHP Version Upgrade Successfully - 11 minutes - Lately in PHP Podcast Episode 92 Part 3 By Manuel Lemos Upgrading to a new PHP version can be a complex task that may fail due to the lack of planning on how to solve each problem of each step of the upgrading job.
Please read this article, watch an 11-minute podcast video or listen to the audio of part 3 of episode 92 of the Lately in PHP podcast to learn how to plan a PHP version upgrade process so it can conclude successfully.
How to Create a PHP Facebook Bot That Can Interact with Facebook Messenger Users and Serve Useful Information Obtained from Other Web Services By Manuel Lemos Facebook provides an API that allows the developers to build bot applications that can interact with Facebook Messenger users via chat messages exchanged automatically.
This package implements a Facebook Messenger chat application that allows users to book traveling trips that they plan to do to their favorite places in the world.
How to Develop a Scalable Application using the Laravel Repository Design Pattern By Manuel Lemos The repository is a software design pattern to model the access to objects stored in a data container.
It allows developers to use an abstraction of how to store the object in the data container.
An application may start using a SQL database to store data objects.
Suppose the application grows, and it is necessary to use a data storage container that is more scalable than using a SQL database. In that case, repository abstraction allows changing the means to access the container without changing the application code.
This package implements the repository design pattern in PHP that developers can easily integrate into Laravel applications.
How to Implement a WordPress Todo List that Can Simplify the Insertion of Task List in the Blog Posts By Manuel Lemos WordPress is a very popular content management system because developers can extend it in many ways. One way to extend WordPress is to add new custom post types.
This package implements a new post type that publishers can add to WordPress. This new post type allows site posts to show to-do lists by inserting a shortcode.
How to Use a PHP Google Charts Solution to Render Graphics with Data Retrieved from a Remote Server that Provides a Web Service By Manuel Lemos Google Charts is a popular API used by many developers to generate graphics to display on their Web pages quickly.
Google Charts API takes a set of data with parameters that define values.
This package can pull data from a given Web service API and convert the data to generate a graphic chart.
This way, this package allows combining the two Web services, minimizing the effort of developers that need to display Web charts on their Web site pages.
When Is the Right Time to Update to a New PHP Version - 5 minutes - Lately in PHP Podcast Episode 92 Part 2 By Manuel Lemos When you consider updating your applications to use a new PHP version, many available versions are available.
Updating too soon or too late to a newer version of PHP may cause problems of instability or security in their applications.
Please read this article, watch a 5-minute podcast video or listen to the audio of part 2 of episode 92 of the Lately in PHP podcast to learn about criteria that you can use to do a safe version update.
Why You Need to Choose the Right Moment to Upgrade to a New PHP Version - 4 minutes - Lately in PHP Podcast Episode 92 Part 1 By Manuel Lemos Every developer depends on several types of software applications to run their applications to do their work. Examples of those software applications are PHP, a database server, a Web server, and an operating system.
Newer versions of these software applications are released to improve their features and fix their bugs to benefit the community of developers that use them in their projects.
Upgrading too soon or too late to a newer version of a software tool that you need may cause problems of instability or security in their applications.
Please read this article, watch a 4-minute podcast video or listen to the audio of part 1 of episode 92 of the Lately in PHP podcast on why it is essential to carefully choose the right time to upgrade to a newer version of PHP or those software tools.
How to Implement a PHP Google Translate Service in Your PHP WebSite Using the Google Translate API from JavaScript By Manuel Lemos Google Translate is a popular service that allows anyone to translate text between two languages.
The original Google Translate service is made available on a Google site.
It is also possible to use the Google Translate service on another site by calling the Google Translate API.
This package provides an alternative to making Google Translate available on another site that uses JavaScript to call the Google Translate service using the Google JavaScript libraries to call the service.
How Can PHP Encrypt Text in a Way that the Result Is Still Readable by Using Transposition of Characters By Manuel Lemos Some applications need to encrypt text strings with the secret key so that the resulting encrypted value still uses readable characters.
Shifting the position of the characters in an unpredictable way is an approach to encrypting the text that guarantees that the resulting text string will still be readable.
This package implements a transposition cipher algorithm that can encrypt text using only the original string characters in a different position. Therefore it preserves the readability of the encrypted string characters.
How to Create Your Own PHP Job Openings Site to Publish Job Offers in Any Business Area By Manuel Lemos Many professionals work as freelancers for other companies to do the work they need.
Usually, freelancers don't know what jobs exist, nor do companies know how to find professionals that match their job requirements.
This package provides an API that implements a system to connect companies with jobs with professionals looking for work.
Since it is a generic job system API, you can adapt it to any activity area.
How to Configure a PHP PDO Connection using Class Variables to Setup Database Parameters By Manuel Lemos PDO is a popular PHP extension that provides several interfaces for classes that can access many types of SQL databases.
Usually, the developer defines a connection to a specific database type using a connection string with a particular syntax.
Many developers prefer to set connection parameters using specific values passing individual parameters because it is more clear to configure each parameter.
This class provides a means to connect to a database using PDO by specifying the connection parameter values using class variables of a sub-class of this class.
How Can PHP Authenticate a User and Identify a Logged without Using PHP Sessions By Manuel Lemos Authentication of users is a common need of many PHP applications.
After the user authenticates, applications need to have a way that the user is the same person verified using a method implemented by the application.
This package supports several methods to authenticate users. This way, it provides greater flexibility to applications that use this package.
This flexibility allows developers to change the authentication method easily in the future if the application can benefit from changing the authentication method.
How to Deploy a Laravel App with Docker and Kubernetes to Achieve Greater Scalability in an Automated Way By Manuel Lemos Docker is a tool used in projects that need to deploy applications that may need to use multiple servers to run in a scalable way. Docker can deploy applications as containers.
Kubernetes is a system that can orchestrate the deployment of applications using multiple containers.
This package demonstrates how you can deploy a Laravel project combining the possibilities made available by Docker and Kubernetes.
10 Pieces of PHP Developer Advice in 2022: Advice #10: How to Have a Better PHP Developer Career Learning While You Give Advice to Other Developers - 4 minutes - Lately in PHP Podcast Episode 90 Part 10 By Manuel Lemos One of the best ways to learn in practice is to help others solve their problems.
This learning method works well because when you try to solve other people's problems, you also learn more about possible solutions.
Read this article, watch a 4-minute podcast video or listen to the audio of part 10 of episode 90 of the Lately in PHP podcast on how to advise yourself and other PHP developers to evolve in your PHP developer career.
How to Develop a Laravel Package Faster Starting from a Good Skeleton By Manuel Lemos Laravel is a well-known PHP framework with a large ecosystem of PHP developers writing components to extend its core capabilities.
This package can help developers create a new Laravel package with less effort by providing a base skeleton to allow them to get started quickly.
How to Implement a Laravel Backup Manager that Can Store Laravel Application Backup Data in Different Cloud Systems By Manuel Lemos Laravel is a well-known PHP framework that has become very popular among PHP developers worldwide.
Having a backup of the data used by an application is essential to have an alternative plan when something goes wrong in the application's environment.
This package provides a backup solution for Laravel applications that is very flexible.
It allows developers to control several valuable options, like the remote service that it will use to store the backup data and the possibility to list the backup copies that it has taken previously.
10 Pieces of PHP Developer Advice in 2022: Advice #7: How Can You Make Money Selling Better Versions of Your Open Source Software - 6 minutes - Lately in PHP Podcast Episode 90 Part 7 By Manuel Lemos Becoming a successful owner of a software company is the advice given in this podcast episode.
Many developers are employees or contractors who work for companies of other people that are business owners.
An employee works for one customer that is his employer's company.
A contractor may work for several customer companies.
A business owner may have much more customers. Therefore, the business owner can make much more money than an employee or a contractor.
Read this article, watch a 6-minute podcast video, or listen to part 7 of episode 90 of the Lately in PHP podcast to learn how to make more money by becoming an Open Source software business owner.
How to Learn the Test Driven Development Approach from a Real PHP TDD Example By Manuel Lemos Test-Driven Design (TDD) is an approach to building software applications that create test code that will test the application code immediately after the developers write the application code.
This approach makes it easier to create applications that developers can verify if they comply with a given specification.
This package implements a sample application that demonstrates how to create a PHP application using the TDD approach.
How to Implement a PHP Tree View Database Solution to Display Tree Structures Stored in MySQL using Google Charts API By Manuel Lemos Hierarchies represent relations between people or other types of related entities. The hierarchy structure determines which entities are in command of other entities.
Hierarchies can be stored in databases using table records that express what entities are below or above in the hierarchy tree.
This class can retrieve a hierarchy tree structure from a MySQL database table to easily visualize the Google Charts API.
Digital Document Management with Eversign SAAS By Dave Smith The days of signed documents being illegible from multiple faxing, high cost of overnight deliveries, are over. From the individual to the large business, digital document management brings tech to the out dated practices currently in use.
Read this article to learn how you can implement digital signature support in your Web applications using everSign PHP Document Signing package to access to the features of the everSign API.
How Can PHP Compress HTML Pages to Serve at the Maximum Speed Combining Content with Response Compression By Manuel Lemos The HTTP protocol allows compressing the responses to HTTP requests using several algorithms like gzip.
This possibility can make the Web servers respond faster to HTTP requests by reducing the amount transferred to the Web browser, especially when the response is in text formats like HTML, JSON, or plain text.
This package takes advantage of this possibility to reduce the size of HTTP responses generated by PHP scripts.
The package can compress the response data even more when the output format is HTML because it also compresses HTML by eliminating unnecessary parts, like comments, spaces, and line breaks.
How to Implement PHP Robot Check System that Logs Web Site Accesses For Posterior Analysis By Manuel Lemos Many sites get excessive HTTP requests from robot scripts like search engine crawlers such as Google.
The analysis of the robot access activity may be helpful to determine if in the future a site may consider those accesses as valid or ignore them to avoid a needless load of the Web server machine.
This class provides several alternatives to log the details of robot accesses like log files, email, and database table records.
Applications developers may pick different log storage container types depending on what can be better for future analysis.
10 Pieces of PHP Developer Advice in 2022: Advice #6: How Can a Developer Have a Balanced Personal Life with Great Quality - 7 minutes - Lately in PHP Podcast Episode 90 Part 6 By Manuel Lemos Every need developer needs to have a good quality of life to have productive when he does his work.
To have an excellent quality of life, you need to have five kinds of love in your life. Finding these kinds of love is the advice given in part 6 of the Lately in PHP podcast episode 90.
Read this article, watch a 7-minute podcast video, or listen to this podcast episode to learn more about having an excellent quality of life.
How to Use a PHP GraphQL Client Library to Extract Parameters Passed to API Calls By Manuel Lemos GraphQL is a specification for a way to process requests to an API.
It allows developers to create APIs by defining how to extract parameter values from the request using a GraphQL specification file.
This package demonstrates how to use a GraphQL specification to implement an API using the Laravel Framework quickly.
How to Create a PHP Quiz Online Reading Questions and Answers from INI Configuration Files By Manuel Lemos Quizzes can be a great way to provide entertainment to users of a site. Quizzes can also be a way to teach users about topics of their interest, showing the correct answers to specific questions.
This package can manage quizzes presented on the Web site with questions and answers read from INI configuration files.
This possibility allows site owners to quickly create quizzes by changing configuration files, thus without having to change the site code or using databases.
How to Implement a PHP Facebook ChatBot that Can Message Many Chat Users at Once By Manuel Lemos Chatbots can be helpful to automate the interactions between users of a site and the site managers that provide support to those users.
This package provides a chatbot agent class that can automate the interactions with many Facebook chatbot users at once, including delivering broadcast messages that can reach all chatbot users.
How Create a Complex API using a PHP REST API Library the Reduces the Need to Write So Much API Implementation Code By Manuel Lemos Many Web applications provide APIs to expose their functionalities to external applications.
Usually, those applications provide a REST API to manipulate information records stored in databases accessed using model classes.
This package makes it simpler to create complex REST API by reducing the effort to write code to set up and configure REST APIs that provide access to many model classes in the same API provided by applications written with the Laravel framework.
How to Implement a PHP Transformer Pattern Solution to Configure What Data a Page Displays Based on the HTTP Request Parameters By Manuel Lemos This class can transform data presented by Laravel applications.
It provides classes that transform data retrieved from data sources using the current HTTP request parameter values that configure the data transformation details.
The package provides an abstract transformation class that applications can use to create their own rules to transform the source data more conveniently to the application data presentation purposes.
How to Implement Financial Applications using a PHP Wallet API By Manuel Lemos Wallets are containers that securely store money amounts. Applications can perform different types of operations with money held in wallets.
This package implements an API that can perform several operations with wallet money amounts.
Using this API, developers can implement financial applications that do not need to maintain the wallet management services.
10 Pieces of PHP Developer Advice in 2022: Advice #4: Share Nice Tutorial Articles that Other Developers Want to See to Learn from You - 4 minutes - Lately in PHP Podcast Episode 90 Part 4 By Manuel Lemos Every developer needs to learn how to solve programming problems to become a better developer.
If you are good at solving a programming problem, you will be more appreciated if you share what you learned to solve that problem.
Teaching in a way that is efficient to pass your programming knowledge is a problem that you need to solve.
Many developers try to teach what they know using tutorial articles. Unfortunately, not every developer knows how to create good tutorial articles that help other developers solve the programming problems they know how to solve.
Fortunately, there is an excellent method to teach how to solve any problem. The explanation of that method is the advice given in part 4 of the Lately in PHP podcast episode 90.
Read this article, watch a 4-minute podcast video, or listen to this podcast episode to learn more about this teaching method using tutorial articles.
How to Implement a PHP Visual Editor Online for Content to Be Published on a Site By Manuel Lemos Content management systems are a popular type of application developed using PHP.
This package implements a content management system that provides visual editors to manage the content that will be published.
This way, it makes content editing and publishing more user-friendly.
How to Use a PHP Model Class to Access Model Stored in Remote Services By Manuel Lemos Some applications need to model classes that manipulate information stored in remote machines.
This package can create model classes that delegate the model implementation to services that can access local or remote services.
This way, this package makes it easier to implement a distributed architecture using multiple computers to implement applications that can scale and allow many requests from many users.
How Can the PHP OAuth Client Class Support New OAuth Servers By Manuel Lemos OAuth is a flexible protocol that allows accessing APIs on behalf of users of a given service.
Despite OAuth is a standard, accessing a new OAuth server requires to create custom code to access the respective API or configure a generic OAuth client like this PHP OAuth client class to adapt its behaviour to access OAuth server using specific configuration values.
Read this article to learn how to support a new OAuth server just by adding a few lines to the JSON configuration file that this PHP OAuth client users.
How to Implement a PHP Grammar Checker to Validate a String that Follow Certain Grammar Rules By Manuel Lemos Some applications need to parse a text that follows specific grammar rules.
This package allows developers to dynamically create their own grammar rules using classes that implement simple grammar rules.
Then the package can validate a string to check if it complies with the grammar rules defined dynamically.
How to Execute Multiple PHP Actions in the Same HTTP Request with Layer Classes By Manuel Lemos Some applications have Web pages that need to perform multiple types of actions with the exact scripts that handle the requests to access those Web pages.
This package can register multiple handler classes that are loaded to perform various actions during the execution of the PHP script that handles the current HTTP request.
How to Quickly Implement Common Calculation Algorithms in Your Applications Using Laravel Services By Manuel Lemos Laravel services allow developers to implement certain services to be easy to reuse in different applications.
This package implements several types of calculation algorithms as Laravel services.
Multiple Laravel applications can reuse these Laravel services without researching and developing the code to implement these calculation algorithms.