Maybe someone can tell me, how can i redirect my website members to an https page ?
And, is it possible with php, to send a fax instead of an email, when the user submit his form ? In my mind, it depend of the ISP !!!
Will perform the redirection. But your script must output nothing before it issues that command, as headers must be sent before content.
PHP does not have intrinsic functions for sending faxes; however it can run external programs. If your server has software installed for sending faxes from a command line, it should not be a problem. ______________________________________________________________________
Pleasy, could you explain me what do you mean by "your script must output nothing before it issues that command, as headers must be sent before content" !?
HTML is sent via HTTP. An HTTP communication consists of two parts: a part containing headers and a part containing content. When an HTTP communcation takes place, either from the client to the server (a request) or from the server to the client (a response), the headers are sent, then a blank line, then the content.
The header part must be sent first -- it's part of the HTTP spec. If at any time your script produces content-type output (basically anything not in HTTP headers), PHP assumes you're finished sending headers. It then sends that required blank line, then your content. If you then try to send more headers, you have violated the HTTP spec, and PHP will complain about it.
Content output includes but is not limited to anything from a print, echo, or print_r statement, and anything (including blank lines) that appears outside a PHP script outside the "<?php...?>" tags.
Content also includes any error or warning messages PHP itself generates and outputs. If your script generates a warning before hitting some statement that generates HTTP headers, you will see two messages: the script warning, and then an error telling you that your script tried to output headers after content output had begun. In that case, fix the first problem, and the second one will likely go away, too.
There is a way around this limitation -- output buffering. PHP can be configured to collect all output and send it all at once. It's more resource intensive and slows down your script, but it allows you to issue header() statements at any time. For more information, please read
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.