View Full Version : blocking referrals...?
corizzle
February 13th, 2006, 00:05
I've seen it done on *coughporncoughsitescough* where they don't let you access the page or site unless you came from one of the referral pages they have listed. I was wondering how they did this and if it's possible for me to get that code/script in either JS or CGI.
If ANYONE can shed some light on this, I would be extremely appreciative.
stuffradio
February 13th, 2006, 01:11
Show me an exmple of one please. But I think if you are talking about what I think you're talking about... they used Javascript and used the history function where it checks where your comming from. If you didn't come from a certain location they're going to block your access. Go through this set of tutorials for js, should help you... http://webmonkey.wired.com/webmonkey/programming/javascript/tutorials/tutorial2.html
corizzle
February 13th, 2006, 01:41
Show me an exmple of one please. But I think if you are talking about what I think you're talking about... they used Javascript and used the history function where it checks where your comming from. If you didn't come from a certain location they're going to block your access. Go through this set of tutorials for js, should help you... http://webmonkey.wired.com/webmonkey/programming/javascript/tutorials/tutorial2.html
That's exactly what I'm looking for, but that tutorial barely touches the "history" subject (only one page). Do you know how to do it?
themoose
February 13th, 2006, 04:22
if($_SERVER['HTTP_REFERER'] != "http://your.ref/url") { exit; }
corizzle
February 13th, 2006, 12:28
!! wow. Thank you.
BeIIy
February 13th, 2006, 14:20
I like .htaccess files.
http://www.javascriptkit.com/howto/htaccess14.shtml
corizzle
February 14th, 2006, 22:50
well say i wanted to make visitors visit a certain page on my site before getting to a certain page, how would i do that?
example:
MAKE USERS VISIT:
INBETWEEN.HTML BEFORE GOING TO BETWEEN.HTML
(even when typing in the url of BETWEEN.HTML)
stuffradio
February 15th, 2006, 01:22
Try
header("Location: page.html");
corizzle
February 16th, 2006, 01:01
Try
header("Location: page.html");
Thanks, but before I do it, what will this code do exactly?
stuffradio
February 16th, 2006, 02:11
It does what it says it does :D
just redirect anyone who visits the page to the location you specify. In this case it'll redirect them to yourname.com/page.html
corizzle
February 16th, 2006, 16:52
meh. =/ Thanks for the effort, but that's not what I need, I can use Javascript for a page redirect...
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.