AI Prompts Managing User Profiles in Sitemaps and Controlling Search Engine Indexing August 29, 2026 by Philip Newman | Leave a Comment Introduction Building a dynamic website with user-generated profiles brings a unique set of technical challenges, particularly when it comes to search engine optimization (search engine visibility). When thousands or millions of users have their own profile pages on your platform, deciding which URLs make it into your sitemap.xml and which ones stay hidden is a […] Read more » PHP 8.3 Sitemaps
PHP Wordpress How to add .webp image support into WordPress. October 9, 2025 / October 9, 2025 by Philip Newman | Leave a Comment I recently needed to add .webp support to one of my websites so I used the following code: How to Use: This enables basic WebP support for uploads and display. For automatic conversion from other formats to WebP (for better performance), consider a plugin like “WebP Express” or extend this code with image processing libraries […] Read more » PHP PHP 8.3 Wordpress
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 Verify a reCAPTCHA using PHP 8.3 January 10, 2025 / January 10, 2025 by Philip Newman | Leave a Comment Here’s a PHP 8.3 function to verify a reCAPTCHA response with Google’s server. Ensure you replace YOUR_SECRET_KEY with your actual reCAPTCHA secret key. Explanation: Notes: Read more » 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 to request an A record from a DNS server in PHP 8.3 January 5, 2025 by Philip Newman | Leave a Comment In PHP 8.3, you can use the dns_get_record() function to query DNS records, including A records. Here’s an example of how to request an A record from a DNS server: Explanation: Example Output: If the domain has A records, the output will look like this: Read more » PHP 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 How to add a BCC to PHP mail() command. September 5, 2024 / February 9, 2025 by Philip Newman | Leave a Comment To add BCC (Blind Carbon Copy) recipients when sending mail in PHP, you can modify the headers to include BCC recipients. Here’s how you can do it: Example using PHP mail() function: Explanation: This will send the email to the primary recipient and also BCC it to hidden1@example.com and hidden2@example.com. Considerations: Read more » PHP 8.3
PHP How to use Māori macrons in your PHP 8.3 code. September 5, 2024 / September 5, 2024 by Philip Newman | Leave a Comment To convert UTF-8 characters with macrons (e.g., Māori macrons like “ā”, “ē”, etc.) into their corresponding HTML entity codes in PHP, you can use the mb_encode_numericentity() function from the mbstring extension. Here’s an example of how to achieve this: Example Code: Explanation: Example Input/Output: Notes: This approach will correctly convert the UTF-8 macron characters to […] Read more » PHP 8.3