D DSL Established Member ★ 20 ★ Impact 6 May 2, 2004 742 views 1 reply #1 How would I make the url of a domain appear in a page if it was redirected? What variable or HTTP_POST method would I use?
How would I make the url of a domain appear in a page if it was redirected? What variable or HTTP_POST method would I use?
A adam_uk Established Member ★ 20 ★ Impact 20 May 2, 2004 #2 <? echo $_SERVER['HTTP_HOST']; ?> that will echothe domain you viisited from then what you could maybe do, is then say if the redirect link was http://bob.com/bob.php you could change the code to above code to <? $url = $_SERVER['HTTP_HOST']; ?> and in the redicrect url (so after bob.php) add <? echo "?url=$url"; ?> now open bob.php on the server and place this <? $url = $_GET['url']; echo $url; ?> the link would appear as redirect link would hcnage to http://bob.com/bob.php?url=yourdomain.com
<? echo $_SERVER['HTTP_HOST']; ?> that will echothe domain you viisited from then what you could maybe do, is then say if the redirect link was http://bob.com/bob.php you could change the code to above code to <? $url = $_SERVER['HTTP_HOST']; ?> and in the redicrect url (so after bob.php) add <? echo "?url=$url"; ?> now open bob.php on the server and place this <? $url = $_GET['url']; echo $url; ?> the link would appear as redirect link would hcnage to http://bob.com/bob.php?url=yourdomain.com