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

Reply via email to