Hi experts, this is related to a question I had and was answered last month or so:
All seemed well after I was given that solution... my PHP script's output back to the browser was nice and clean, with no CR/LF's in the output. That was when I was doing development/testing of my PHP script locally on my VPS using EasyPHP. Now that I have a live domain pointing to my work, a test using my local computer shows that there is a trailing space at the very end of the output to the browser. Please try it live here:
For 'Name", just put TESTNAME. For "User Data", put this:
Then click on "Generate". Copy and paste the long code that is displayed, from the starting "=" sign right to the end of the file. Then paste that into Notepad and then CTRL-A highlight all of that. if you were using Firefox, you'll see that there's an extra space at the very very end of that long code. Doesn't seem like much, but that will be enough to throw my users off. if you try all this with Google Chrome hoever, you'll see that there's no trailing space at the very end (which is what I want).
In my PHP script I'm using the "nl2br" to output this code from a generated file, to the browser. is there any way in PHP to check if there is this final trailing space at the end of my output and if so, delete it... before doing the output to the browser?