PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
You shouldn't try to send page level output through header(). PHP has to add more data into the headers.
Your header call should only be Content-type: text/plain
You should then echo "Thannks for submit!"
Ok,
That's it feyd, I'm NOT trying to send page level output. I'm trying to send HTTP Header level output.
For example, if I have a GET request to http://www.mywebsite.com like GET page/cars/form.php?var1=value1&var2=value2 HTTP/1.1
Host:www.mywebsite.com
I want to answer:
Thank you for Submit
or
HTTP 200 OK
Thank you for Submit
or
HTTP 200 OK
Content-Type:text/plain
Thank you for Submit
I'm not sure if I'm clear enough. I want to answer whatever I want in a HTTP Header level output.
Thank you again, feyd.
Let me show you it this way:
If you create a file "pp.php" filled with: <?php
header('Content-type: text/plain');
echo "Thank you for Submit!";
?>
and you place it in your Server DocumentRoot, so you can reach it with your browser using "localhost/pp.php".
OK.
Now, if you use "Start --> Execute" and type: "telnet localhost 80"
Once you're in, type: GET /pp.php HTTP/1.1
host: localhost
You'll get something like that:
HTTP/1.1 200 OK
Date: Tue, 21 Feb 2006 17:21:45 GMT
Server: Apache
X-Powered-By: PHP/5.0.5
Content-Length: 22
Content-Type: text/plain
Thank you for Submit!
OK.... I don't want those lines... I just want reply "Thank you" or "Jajajaajja" or whatever.
I've seen it in some servers, but how to do it????
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.