header($string);
Used to send a raw HTTP header, often used for page redirects.
Must be called before any other output is sent.
// Redirect the request to https://keithgreer.dev header("Location: https://keithgreer.dev");
// Send an error code to the browser, for example a 404 header("HTTP/1.0 404 Not Found");
March 2024
As PHP continues to evolve, so do the threats that target its vulnerabilities. Ensuring robust PHP security practices is paramount to safeguarding sensitive data and... Continue reading "PHP Security in 2024: navigating the evolving landscape"
August 2021
This PHP function accepts a public Google Sheets URL and converts it into a PHP array. You can use the array to either display the... Continue reading "Google Sheets to PHP Array"
March 2021
The following post will explain how to use PHP/cURL to retrieve data in JSON or XML and process it for using in your PHP application... Continue reading "PHP cURL Requests with JSON or XML"