aximbigfan Posted May 1, 2008 Share Posted May 1, 2008 I have some PHP code, and I need it to not send any headers of any kind. Is this possible? thanks! Chris Quote Link to comment https://forums.phpfreaks.com/topic/103663-send-no-headers/ Share on other sites More sharing options...
DarkWater Posted May 1, 2008 Share Posted May 1, 2008 Why? Every page sends HTTP headers. Quote Link to comment https://forums.phpfreaks.com/topic/103663-send-no-headers/#findComment-530824 Share on other sites More sharing options...
blackcell Posted May 1, 2008 Share Posted May 1, 2008 In response to the previous message I am pretty sure its not possible. This is basic networking physics. Quote Link to comment https://forums.phpfreaks.com/topic/103663-send-no-headers/#findComment-530826 Share on other sites More sharing options...
haku Posted May 1, 2008 Share Posted May 1, 2008 Seeing as the question doesn't make sense as is, why don't you try telling us what it is exactly you want to do. Quote Link to comment https://forums.phpfreaks.com/topic/103663-send-no-headers/#findComment-530828 Share on other sites More sharing options...
aximbigfan Posted May 1, 2008 Author Share Posted May 1, 2008 Basically, it is an experiment to test and see if PHP scripts on different servers can communicate over HTTP. The PHP script that is receiving doesn't use the headers at all, they just get in the way of the data that needs to be read. The PHP on the receiving end sees the data as a text document, and the headers are at the top. Chris Quote Link to comment https://forums.phpfreaks.com/topic/103663-send-no-headers/#findComment-530836 Share on other sites More sharing options...
trq Posted May 1, 2008 Share Posted May 1, 2008 You can't send anything over http without headers. End of story. Quote Link to comment https://forums.phpfreaks.com/topic/103663-send-no-headers/#findComment-530843 Share on other sites More sharing options...
aximbigfan Posted May 1, 2008 Author Share Posted May 1, 2008 2ed question: Is there any way to _strip_ the headers for something once it is received? Chris Quote Link to comment https://forums.phpfreaks.com/topic/103663-send-no-headers/#findComment-530849 Share on other sites More sharing options...
Daniel0 Posted May 1, 2008 Share Posted May 1, 2008 Uh yeah... just strip everything before the first time two line breaks appear. Quote Link to comment https://forums.phpfreaks.com/topic/103663-send-no-headers/#findComment-530871 Share on other sites More sharing options...
haku Posted May 1, 2008 Share Posted May 1, 2008 I'm interested to know what you discover after you are done your experiment. Its good to test stuff out that way and learn new stuff. Quote Link to comment https://forums.phpfreaks.com/topic/103663-send-no-headers/#findComment-530933 Share on other sites More sharing options...
blackcell Posted May 1, 2008 Share Posted May 1, 2008 Sidebar: Daniel0, what do you mean before the first time two line breaks? Quote Link to comment https://forums.phpfreaks.com/topic/103663-send-no-headers/#findComment-530967 Share on other sites More sharing options...
Daniel0 Posted May 1, 2008 Share Posted May 1, 2008 An HTTP response would look sort of like this: HTTP/1.1 200 OK Date: Thu, 01 May 2008 13:21:26 GMT Server: Apache/2.2.3 (CentOS) Content-Length: 1542 Connection: close Content-Type: text/html; charset=UTF-8 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> *snip* The headers end after the first empty line. Quote Link to comment https://forums.phpfreaks.com/topic/103663-send-no-headers/#findComment-530977 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.