FW: [PHP] Newbie question about links

From: Date: Thu, 14 Feb 2002 12:43:31 +0000
Subject: FW: [PHP] Newbie question about links
Groups: php.general 
Request: Send a blank email to php-general+get-84729@lists.php.net to get a copy of this message
> That won't work. > If you relocate using header("Location: ...") then it DOES show the > original URL in the browser's address field. > > There are other ways of relocating which don't do this. For instance: > (1) include("real-path"); > (2) readfile("real-path"); > > Jill > > > -----Original Message----- > From: Jason Wong [SMTP:php-general@gremlins.com.hk] > Sent: Thursday, February 14, 2002 12:04 > To: php-general@lists.php.net > Subject: Re: [PHP] Newbie question about links > > On Wednesday 13 February 2002 03:13, Chris Schoeman wrote: > > I want to make links on my website which doesn't show the original url > of > > that page. > > How Can I do that? > > Have your links of the form: > > > htpp://www.mydomain.com/linkto.php?id=123 > > > Then in linkto.php you need to redirect (using header()) to the > appropriate > URL. Something like: > > > <? > > $LINKS = array("123" => "www.doo.com", > "124" => "www.dah.com/doodah.html"); > > if ($LINKS[$id]) { > $link = $LINKS[$id]; > header("Location: http://$link"); } > else { > echo "Invalid link!"; > } > > ?> > > > > > > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > > /* > It occurred to me lately that nothing has occurred to me lately. > */ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#84729) next »