![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
ex-TeenGodFather
Industry Role:
Join Date: Nov 2001
Location: Suomi Finland Perkele
Posts: 20,306
|
PHP help?
I have a list of urls that I only want to be accessible from 1 specific url, is this the correct php-way to do it. I tested it and it seemed to work...
PHP Code:
__________________
..and I'm off. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
ex-TeenGodFather
Industry Role:
Join Date: Nov 2001
Location: Suomi Finland Perkele
Posts: 20,306
|
the hahahaha is = and another =
__________________
..and I'm off. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
ex-TeenGodFather
Industry Role:
Join Date: Nov 2001
Location: Suomi Finland Perkele
Posts: 20,306
|
spoofing and such is not a concern, this is a free site and bandwidth usage etc isn't a problem.. I just don't want people to be able to move thru the directories by typing.. as my directory structure is very easily guessable. lol.
__________________
..and I'm off. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Too lazy to set a custom title
Join Date: Jan 2002
Location: Holland
Posts: 9,870
|
__________________
Don't let greediness blur your vision | You gotta let some shit slide icq - 441-456-888 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
ex-TeenGodFather
Industry Role:
Join Date: Nov 2001
Location: Suomi Finland Perkele
Posts: 20,306
|
No.. There's a reason though.
anyhow, is *that* a correct PHP-way to do it? also, if I send the users thru a hyperlink say; http://www.URL.com/cgi-bin/script/sc...hecodeisat.php will the original referer be the script or the .shtml page? It 'seemed' to be the .shtml page in my tests, but as I'm a php-n00bie, I have no idea how it really works.
__________________
..and I'm off. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Depending on how many urls I was going to do, I might do it something like this instead.
<?php $okrefs=array(); $okrefs['http://www.url1.com/page.shtml']=1; $okrefs['http://url1.com/page.shtml']=1; $okrefs['http://www.url2.com/page.shtml']=1; $okrefs['http://url2.com/page.shtml']=1; $ref=strtolower($HTTP_SERVER_VARS['HTTP_REFERER']); if($okrefs[$ref]= =1){ echo("OK"); }else{ echo("Redirect this"); exit(); } ?> But some browsers/surfers will hide the referer so then you can't really do this at all. Is it for admin type purposes? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
ex-TeenGodFather
Industry Role:
Join Date: Nov 2001
Location: Suomi Finland Perkele
Posts: 20,306
|
Quote:
![]()
__________________
..and I'm off. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
ex-TeenGodFather
Industry Role:
Join Date: Nov 2001
Location: Suomi Finland Perkele
Posts: 20,306
|
Quote:
I send them from say http://ww.url.com/page.shtml that page as a hyperlink <a hreF="/cgi-bin/script.cgi?=http://www.urlwiththecode.com>link</A> So basically I send to the cgi-bin page, which in turn sends them to the 'end page'. So which is the referer? The page where user clicks the link, or the cgi-script that redirects them to the right place?
__________________
..and I'm off. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Quote:
<?php echo("'$HTTP_SERVER_VARS['HTTP_REFERER']'"); ?> There IS another server variables for "redirect" referers as well. Can't remember the name of it right now. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |