PHP: Remove header data (strip_header) function
This is a simple function I have used numerous times to simplify the process of stripping the header data which is normally found at the top of most web server requests and responses. I normally use this function if I am working with fsockopen and need to remove the response header before processing the response.
1 2 3 4 5 6 7 8 |
/* * Strips header data from provided data * By Shane Rutter ([email protected]) * http://shanerutter.co.uk */ function strip_header($data){ return substr($data, strpos($data,"\r\n\r\n")+4); } |