Jump to content
xisto Community
vizskywalker

Http Headers

Recommended Posts

I know you can use the header() function to send http headers. But I want to know if it is possible to simply echo them, like you can print them in perl. Also, is it possible to create a non-expiring cookie. Most sites that have a remember me option imply set the cookie to expire in a year or two, but it will eventually expire. Is it possible to create a cookie that never expires?~Viz

Share this post


Link to post
Share on other sites

Actually, I'm not looking for a function. In perl, you can simply print http headers like so:

print "Location: http://astahost.com "Cookie: name = 'name', value = value\n";print "Content-type: text/html\n\n";
The double newline character signals the end of the headers. I was wondering if using echo or print in php, the same thing was possible, because when I tried it, nothing happened, and I wondered if a special format was required, like maybe

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.