PHP

PHP is a popular general-purpose scripting language that is especially suited to web development PHP originally stood for Personal Home Page, but it now stands for the recursive initialism PHP: Hypertext Preprocessor.

www.php.net

PHP 8.1 Contributors

What’s new in PHP 8.1

25.11.2021 -exactly a year ago since the release of PHP 8.0 the version 8.1 is rolled out, and with it, new features and a significant speed increase. From the point of a Webmaster that uses Laravel or WordPress, it’s important to note that 8...

PHP handlers Compared

In plain English: PHP handlers are Apache modules that interpret and run PHP code. Using right PHP handler on your website can have a huge impact on the overall performance. In cPanel you can have different PHP versions with different handlers for...

Display the last modified file in directory in cPanel ☑️

From the terminal (SSH): grep -Ril "find /home/username/public_html/ -type f -mtime -2" From a .php file: <?php $last=shell_exec('grep -Ril "find /home/username/public_html/ -type f -mtime -2"'); echo "<pre>$last</pre>"; ?> The output will...

Set default Timezone via htaccess in cPanel

Here in how to change the default Time Zone permanently in cPanel using the .htaccess file Step 1. First, check you current time yone settings using a simple .php script like this: <?php echo "Today is " . date("Y/m/d") . "<br>"; echo "The...

PHP Script to check for open ports

Here is a simple PHP script that you can use to test if a port is open on the server or not. <?php $host = $_SERVER['SERVER_ADDR']; $ports = array(21, 25, 80, 81, 110, 443, 3306); foreach ($ports as $port) { $connection = @fsockopen($host...

Screenshot of the Leaf PHP Mailer 2.8

🍃 LeafMailer – Malicious PHP Mailer script

A few weeks ago I was approached by a friend of mine, complaining about high load and CPU usage on one of his shared hosting servers (DELL) running CentOS 7, CloudLinux and cPanel. I was more than happy to take a look, and after a couple of minutes...