PHP How to connect to SFTP using PHP8.3. February 9, 2025 / February 9, 2025 by Philip Newman | Leave a Comment To ensure the connection is SFTP, we need to use PHP’s SSH2 extension instead of the FTP functions. The ssh2_sftp extension allows secure file transfers over SFTP. Updated SFTP Upload Function This version connects to an SFTP server on port 22, uploads an XML file to the /data directory, and closes the connection when done. […] Read more » PHP PHP 8.1 PHP 8.2 PHP 8.3
PHP What is PHP? January 7, 2025 / January 7, 2025 by Philip Newman | Leave a Comment PHP is a popular open-source scripting language primarily used for web development and creating dynamic content for websites. Here’s a brief overview: Here’s a simple example of PHP code: This script would output “Hello, World!” on the webpage when executed on a server with PHP installed. PHP has evolved over the years to support more […] Read more » PHP PHP 8.1 PHP 8.2 PHP 8.3
PHP How do I reverse an IP address for use in DNS BL? January 5, 2025 / January 5, 2025 by Philip Newman | Leave a Comment Here’s a small function in PHP 8.3 that reverses an IPv4 address: Explanation: This ensures the function works safely and as expected. Read more » IP Address PHP 8.2 PHP 8.3
PHP Temperature conversions between Celsius and Fahrenheit using PHP. December 31, 2024 / December 31, 2024 by Philip Newman | Leave a Comment Here’s an example of a PHP 8.2 class that handles temperature conversions between Celsius (C) and Fahrenheit (F): This class provides two static methods: The example usage demonstrates how to use the class to perform conversions. Let me know if you’d like to expand this functionality! Read more » PHP PHP 8.2
PHP How to get country codes using the ODOO xmlrpc API and PHP. December 21, 2024 / December 21, 2024 by Philip Newman | Leave a Comment To fetch country codes from an Odoo instance using PHP 8.2, you’ll need to use the Odoo XML-RPC API. Below is an example of how to achieve this: Step 1: Set Up PHP Environment Ensure you have PHP 8.2 installed with the necessary extensions, including the cURL extension, which is used for making HTTP requests. […] Read more » PHP PHP 8.2
PHP Using PHP to turn an HTML table into an Array() December 21, 2024 / December 21, 2024 by Philip Newman | Leave a Comment To convert an HTML table into a PHP array in PHP 8.2, you can use the DOMDocument class, which provides a structured way to parse and extract data from HTML. Here’s an example of how to achieve this: Example Code: Output: Explanation: This approach is flexible and can handle more complex HTML tables with nested […] Read more » PHP 8.2