To enable the PHP-cURL extension on Linux Ubuntu/Debian, you must first install it with the command:
Continue reading “How to enable PHP-cURL”Category Archives: PHP
How to hide email on a site from spammers
The first way through JavaScript:
Continue reading “How to hide email on a site from spammers”How to display the current year in the footer of the site
Let’s say the current year and copyright are manually specified in the template of the site:
Continue reading “How to display the current year in the footer of the site”How to downgrade PHP
Using an example, I will downgrade PHP in Ubuntu 18.04, in which version 7.2 is installed by default. I do not recommend downgrading PHP, since newer versions are more productive and close vulnerabilities, but there are times when you need to run an old script or engine that does not work on newer versions of PHP, and it is very difficult to fix the code due to the fact that there are a lot of files.
Continue reading “How to downgrade PHP”Installing Memcached
Let me give you an example of installing Memcached, which allows you to cache data in RAM.
Continue reading “Installing Memcached”PHP script “TOP debtors of the Nika billing system”
Let me give you an example of a PHP script displaying a list of debtors from the Nika ASRM database:
Continue reading “PHP script “TOP debtors of the Nika billing system””How to solve “Extension mysqli | mysql not found”
I noticed once on one of the new Ubuntu servers an error when opening phpMyAdmin – “The extension mysqli | mysql not found.”
Continue reading “How to solve “Extension mysqli | mysql not found””Simple page caching
I will give an example of a simple caching of PHP pages with an interval of 600 seconds (10 minutes).
Paste at the beginning of the code:
Continue reading “Simple page caching”Solution PHP Notice: Use of undefined constant x — assumed ‘x’
I once noticed the following notification when writing a PHP script:
PHP Notice: Use of undefined constant uid - assumed 'uid' in /scripts/file.php on line 31 PHP Notice: Use of undefined constant value - assumed 'value' in /scripts/file.php on line 32
Continue reading “Solution PHP Notice: Use of undefined constant x — assumed ‘x’”
Script to send SMS via Goip4 gateway for ABillS
I will give an example of a PHP script to which I send SMS messages through the GoIP4 gateway.
First, we choose tariffs with only monthly charges:
Continue reading “Script to send SMS via Goip4 gateway for ABillS”