Jump to content

Hiding HTTP Referrer


Yahweh

Recommended Posts

I'm certain there is a way to do this, but I haven't found it yet, but I'm looking for a way to hide a user's HTTP referrer if they click on an external link on my site.I want a script like this for these reasons: I own a satire website that quotes silly things that people say on internet messageboards, where quotes are put in the following format:

"quote"User, [url=source]Message Board[/url]

I always link to the original message so people can check to see that the quotes are in context. However, one board in particular gets quoted a lot, and they don't really like that my site quotes the silly things some of its members say; so, the admins of the board put a javascript on their site that redirects users to a 404 page if their http referrer has my site.This causes a problem because it breaks all of my links from my site to the particular quoted board, and it forces all my users to jump through all kinds of hoops to view the board (i.e. they have to copy/paste the URL into a new browser window to check quotes at their original source).The only true solution to this problem is to hide my user's HTTP referrer information, but I haven't figured out a way to do this. Any help would be appreciated :)

Link to comment
Share on other sites

Interesting,gonna look this one up, but off the top of my head i thought of a labor-some workaround lol.redirect the link to a processing page youve made and stored on a different server than your own.when a user clicks on the link to get the site it came from, they are first redirected to the outside-server page you made, (sending data via form/post) on outside page the data is collected and then they are redirected to the source of the quote.K, off to find a real way to just hide the HTTP ref now, :)Of course with the above method sooner or later theyll just block that http-ref too:)Any idea what the code is they use to pinpoint it came from you?Im not familiar with how they isolate your http ref.

Link to comment
Share on other sites

if the other site is not checking their P's and Q's you might be able to simply change your links:from: http://www.theirdomain.com/theirquotedpage.htmto: http://theirdomain.com/theirquotedpage.htmOf course this, too, is not permanent and would only work if their sniffer is hard coded for the full domain path and not the short.Of course, the easiest, less code intensive solution is to ask your posters to use a linking service like http://www.tinyurl.com

Link to comment
Share on other sites

Interesting,gonna look this one up, but off the top of my head i thought of a labor-some workaround lol.redirect the link to a processing page youve made and stored on a different server than your own.when a user clicks on the link to get the site it came from, they are first redirected to the outside-server page you made, (sending data via form/post) on outside page the data is collected and then they are redirected to the source of the quote.K, off to find a real way to just hide the HTTP ref now, :)Of course with the above method sooner or later theyll just block that http-ref too:)
I actually figured out how to hide the HTTP referer on my own with this code:
<% Dim objXmlHttp Dim strHTML Set objXmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0") Dim myPage     myPage = Request.ServerVariables("QUERY_STRING")     if myPage = "" then         myPage = "http://www.targetsite.com"     end if With objXMLHTTP     .open "POST", myPage, False     .setRequestHeader "Content-Type", "text/html; charset=ISO-8859-4"     .setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"     .setRequestHeader "Referer", "http://targetsite.com/"     .setRequestHeader "ACCEPT-LANGUAGE", "en-us"     .setRequestHeader "Accept", "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*"          .send     While .readyState <> 4         .waitForResponse 1000     Wend     strHTML = .responseText end with Set objXmlHttp = Nothing response.write strHTML%>

I use that script to pull up pages from their site, then I use a few Replace functions to change selected words in the strHTML string to something funny (it works in the same way as one of those "text to Elmer Fudd" translators).However, my site is still being blocked, I get a 403 error which is accomplished in basically the same way as preventing hotlinking, where the admins of the site have added some kind "don't accept http requests from foreign IPs" command in their .htaccess file. I have not figured out a way to get around that.

Any idea what the code is they use to pinpoint it came from you?Im not familiar with how they isolate your http ref.

I access the site in two different ways:- using the translation script above.- providing links to the site.For the second method, the admins have put a javascript on all of their pages to detect HTTP referers, where basically if the referer is fstdt.com or www.fstdt.com then the javascript forwards the client to a 404 page. The site I'm trying to access is Free Conservatives, and the code they use is this:
<script language="javascript">//Let's create the variable for the arrayvar refarray = new Array();//Now we will add the strings into our arrayrefarray['http://www.fstdt.com'] = "?";refarray['http://fstdt.com'] = "?";//Here we scan our array for the above stringsfor (var i in refarray) {if (document.referrer.indexOf(i) != -1) window.location.replace(refarray[i]);}</script>

That basically breaks all of the external link from my site to the target site, although targetsite pages can still be accessed by pasting the URLs in a new browser.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...