PHP giving a trailing “=” on each line after reading from stdin
问题 The contents of stdin is getting corrupted with word wrapping and trailing "=" throughout which obviously breaks the URL that I need to post. I need to extract a URL/link from an email then post the URL. So, I'm piping my email to a php script in cpanel using a standard code snip I've seen all over the internet: $fd = fopen("php://stdin", "r"); $email = ""; // This will be the variable holding the data. while (!feof($fd)) { $email .= trim(fread($fd, 1024)); } fclose($fd); Then dumping the