On Tue, 2008-09-16 at 17:49 +0100, Nathan Rixham wrote: > tedd wrote: > > At 3:16 PM +0100 9/16/08, Nathan Rixham wrote: > >> Alain R. wrote: > >>> Hi, > >>> > >>> how in PHP can i create the similar header as following ? > >>> <head> > >>> <base href="www.mywebsite.com"> > >>> </head> > >>> > >>> thx. > >>> > >>> A. > >> > >> just incase everybody else went down a complete tangent on this one > >> > >> <head> > >> <base href="<?php echo $_SERVER['HTTP_HOST']; ?>"> > >> </head> > >> > >> it's not nice, elegant, the *proper* way to do things but it'll do the > >> job if I understand you correctly > > > > > > I don't see anything wrong with it. It looks nice, elegant and proper to > > me. > > > > Cheers, > > > > tedd > > thanks tedd, to be full proof though there's a lot lacking; for example > http/1.0 browsers don't pass through HTTP_HOST seeing as it's only in > http/1.1; also even on http/1.1 it's sometimes spoofed; further there's > the whole HTTPS_HOST to concider; there's only one full proof method and > thats to simple hard code or define it: I think you mean "fool proof" when you say "full proof". It's synonymous with "idiot proof". Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php