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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-07-2003, 02:06 PM   #1
lil2rich4u2
ICQ: 175171926
 
Join Date: Oct 2002
Location: New York, NY
Posts: 11,046
any php guys around? how can i do this?

this is obviously not the code, but i dont know how else to explain it to you ...


if ($referrer != *.domain.com) {
redirect to error page
halt
}

if ($referrer = *.domain.com) {
redirect to correct page
halt
}

basically i want to send the surfer through a script that will check referrer, and if he did not come from a specific page i want him sent to an error page.

if he did come from specific page, i want him sent to a different page.

also it must strip the referrer and only look at the domain, and not the trailing sub domains.


if this is complicated, shoot me a quote to [email protected]

thanks.
__________________
HEY!!

Unbeatable hosting! Customer service is top notch!

--> ISPrime <-- Do a search on any board, their reputation is rock solid .. for years!!
lil2rich4u2 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-07-2003, 02:15 PM   #2
lil2rich4u2
ICQ: 175171926
 
Join Date: Oct 2002
Location: New York, NY
Posts: 11,046
job is done

thanks xascripts
__________________
HEY!!

Unbeatable hosting! Customer service is top notch!

--> ISPrime <-- Do a search on any board, their reputation is rock solid .. for years!!
lil2rich4u2 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-07-2003, 02:21 PM   #3
Nathan
Confirmed User
 
Industry Role:
Join Date: Jul 2003
Posts: 3,108
Hey lil,

Code:
$refinfo = parse_url($_SERVER['HTTP_REFERER']);
$levels = explode('.', $refinfo['host']);
$toplevel = array_pop($levels);
if (count($levels)) $dom = array_pop($levels).'.'.$toplevel;

if ($dom hahahaha 'okdomain.com') {
  Header('Location: http://www.okurl.com/page.html');
} else {
  Header('Location: http://www.badurl.com/page.html');
}
exit;
You could also use regex to do all this, but this should work just as well. Do not want to think of a weird regex to filter out a domain right now <G>
__________________
"Think about it a little more and you'll agree with me, because you're smart and I'm right."
- Charlie Munger
Nathan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-07-2003, 02:35 PM   #4
detoxed
vip member
 
Join Date: Jan 2003
Posts: 17,798
lil2rich4u2 is a dildo
detoxed is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-07-2003, 03:05 PM   #5
grumpy
Too lazy to set a custom title
 
grumpy's Avatar
 
Join Date: Jan 2002
Location: Holland
Posts: 9,870
better do that in .htaccess . No extra sever load.
__________________
Don't let greediness blur your vision | You gotta let some shit slide
icq - 441-456-888
grumpy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.