Hello, I need a script that will change ref and redirect user. PHP if possible or java. Example: I have few websites like: http://exemple1.com http://example2.com http://example3.com etc. Surfer click on a link at any of these websites pointing to another of my websites, for example: http://WebsiteWithRedirect.com Now here is where this script is installed, so when surfer hits http://WebsiteWithRedirect.com script redirect him to for example http://www.somewebsite.com with referrer WebsiteWithRedirect.com not exemple1.com, example2.com etc. With regular header PHP redirect script: <?php header( 'Location: http://www.somewebsite.com' ) ; ?> PHP: it will redirect with exemple1.com, example2.com etc. as referrer so I need something else.
Hi, Below code may help you. <form method="post" action="http://www.somewebsite.com" name="gForm" id="gForm"> <input name="referer" type="hidden" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" /> <script type='text/javascript'>document.gForm.submit();</script> </form> write the above code in "http://WebsiteWithRedirect.com"
I think that method will create POST request on destination site, instead of a GET request (if it works, I haven't tested it actually). A webmaster of a destination website will be able to determine that difference from server logs. If that matters in this case though.