NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Quick Header function

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
6 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 11-08-2005, 01:39 PM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Jun 2005
Location: B.C, Canada
Posts: 376
phpwiz will become famous soon enoughphpwiz will become famous soon enough
 



Quick Header function


well im not sure if i am doing this right and i have seemed to forget how to do the header function where it will goto another page but just to make sure this is what i have

Header("http://bla.com");

thats what i got but if thats wrong tell me how the hell to do it lol.
__________________
:cool: Cheap Turnkey Scripts: Turnkey4Less.com
OnlineGames.net
phpwiz is offline  
Old 11-08-2005, 02:30 PM   #2 (permalink)
Domains my Dominion
 
sdsinc's Avatar
Join Date: Aug 2005
Location: Web 1.0
Posts: 9,953
sdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatness
 


Third World Education Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Animal Rescue Animal Cruelty AIDS/HIV Animal Rescue Wildlife Breast Cancer Animal Rescue Wildlife
PHP Code:
Header("Location: http://bla.com"); 
Always leave a space after Location: in order to stick to the HTTP specs and avoid possible problems with some browsers
__________________
NameNewsletter.com - free lists of available domain names
ZoneFiles.net (beta) - ccTLD and gTLD droplists
sdsinc is online now  
Old 11-12-2005, 08:32 AM   #3 (permalink)
sm
NamePros Regular
Join Date: Oct 2005
Location: India
Posts: 608
sm is just really nicesm is just really nicesm is just really nicesm is just really nice
 



In addition to the above, make sure that the header function gets called before any output is sent to the browser.... unless you are using output buffering (via the function ob_start().. in which case at the very end of the script or at some point you'll have to flush out the buffer using the function ob_flush() at which point the buffered output actually gets displayed in the browser).

also, the location header isnt the only one that you can use..... other types that are commonly used are ...

Last-Modified:
PHP Code:
header("Last-Modified: " gmdate("D, d M Y H:i:s")) 
this will indicate the last time the document was changed on the server.

You can also use the cache control header.. to tell the browser how to cache a page, like this:

PHP Code:
header("Cache-control: no-store, no-cache, must-revalidate "
here we request the browser not to cache the page at all.
????: NamePros.com http://www.namepros.com/code/138592-quick-header-function.html

there are many other types.. and you can find more details on php.net ... just search around or download the php manual.....
__________________
My blog (beta)

Bachelor.co.in - Gemstone.co.in
Assets.co.in - PropertyDealers.org
MortgageFirms.org - eLearner.org
sm is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
How is my new Header? abdulmueid Graphic Design / Flash 31 12-27-2005 07:14 AM
Logo revision with Exceptional Flash header $65 Edisonian Design Contests 34 11-09-2005 04:38 PM
Need code quick! 25 NP$! **URGENT** mholt Programming 5 11-06-2005 03:47 PM
Few domains $$ quick sale videcodes.ws capmex Domains For Sale - Fixed Price 1 11-03-2005 04:24 PM

 
All times are GMT -7. The time now is 02:19 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger