LikeLearn
asked on
HIde HTTP_REFERER
I have dynamically created page (url/firstpage.php
) with link to second page (url/firstpage.php).
when i am echo $HTTP_REFERER from second page i am get (url/firstpage.php). How i can hide $HTTP_REFERER from second page.
) with link to second page (url/firstpage.php).
when i am echo $HTTP_REFERER from second page i am get (url/firstpage.php). How i can hide $HTTP_REFERER from second page.
Whats the question?
Browsers will always send the referer, if they support it (which most popular browsers do).
There is no way to hide what page the link was on that led the browser to the second page.
There is no way to hide what page the link was on that led the browser to the second page.
What's the problem ?
Don't echo it :)
Don't echo it :)
You can do this:
unset($HTTP_REFERER);
unset($HTTP_REFERER);
ASKER
I can't do anything in second script.
I need solve this problem by modifying only first
I need solve this problem by modifying only first
you see, LikeLearn, the HTTP_REFERER variable is *not* sent by PHP, instead, it is sent by the browser (see jlatour's comment).
ASKER
Can i simulate browser from first script?
And post different HTTP_REFERER
And post different HTTP_REFERER
Yes you can... let's say file1.html calls script2.php, well instead of calling it like this: <A HREF="script2.php">, you call it like this:
<A HREF="script2.php?HTTP_REF ERER=">
that way, $HTTP_REFERER won't contain anything
or, <A HREF="script2.php?HTTP_REF ERER=Hello ">
$HTTP_REFERER will now contain Hello
<A HREF="script2.php?HTTP_REF
that way, $HTTP_REFERER won't contain anything
or, <A HREF="script2.php?HTTP_REF
$HTTP_REFERER will now contain Hello
explain why you don't want to have the http_referer into the second script
ASKER
to: Dragon Slayer
I try your advice and it's doesn't work
HTTP_REFERER always contains script1.php not "Hello"
I try your advice and it's doesn't work
HTTP_REFERER always contains script1.php not "Hello"
same idea
page1.php
<A HREF="script2.php?ref=hell o">Test</a >
page2.php
<?
if (isset($ref))
{ $HTTP_REFERER = $ref;
print $HTTP_REFERER;
}
?>
page1.php
<A HREF="script2.php?ref=hell
page2.php
<?
if (isset($ref))
{ $HTTP_REFERER = $ref;
print $HTTP_REFERER;
}
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: jlatour
Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
aolXFT
EE Cleanup Volunteer
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: jlatour
Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
aolXFT
EE Cleanup Volunteer