Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 10th, 2003, 01:49 PM
Authorized User
 
Join Date: Sep 2003
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Headers

I have an application that starts off in one script(.odb this is used to authenticate users) and then moves to .php. Once in PHP I need to set cookies and use the Header() function.
Is there any way to delete existing headers or add to them in PHP?


  #2 (permalink)  
Old October 10th, 2003, 02:00 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Hi,

In PHP this is done with the header function.
http://www.php.net/header

Also have a look at the broader HTTP functions:
http://www.php.net/http

: )
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::
  #3 (permalink)  
Old October 10th, 2003, 02:21 PM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can send new HTTP headers using the header() function:
  http://www.php.net/header

You can suppress the X-Powered-By: PHP/<version> header in PHP.ini. The only other header sent by PHP is the Content-Type header, and though you can change the default mime-type to whatever you want, I don't think you should. It's set to "text/html" by default.



Take care,

Nik
http://www.bigaction.org/


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding sub headers.... rupen Crystal Reports 6 May 14th, 2007 04:56 AM
CheckBoxList Headers Ric_H C# 0 June 26th, 2006 10:29 AM
"headers already sent" - one cure tks001 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 February 20th, 2006 07:05 PM
WHat is "http headers"? gilgalbiblewheel Classic ASP Databases 1 September 14th, 2005 11:59 AM
Help With PHP Headers!! majingohan Beginning PHP 1 April 17th, 2005 04:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.