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 01-01-2003, 07:08 PM   #1
AkiraSS
Confirmed User
 
Join Date: Jan 2003
Location: ICQ: 17630227
Posts: 2,988
Help me, I want to set up a PHP redirect file, Thanks

Hi I have a problem,
I want a simple PHP file that only does redirect,
I have something made up but doesn't work:

<?php
switch($id) {
case 0: $url = "http://www.yahoo.com"; break;
case 1: $url = "http://www.altavista.com"; break;
}
header("Location: $url");
?>

I named it redirect.php

and if I make query http://www.mysite.com/redirect.php?id=0
it takes me to yahoo.com

but if I make query http://www.mysite.com/redirect.php?id=1
it takes me to yahoo.com again instead of altavista.com

help?
AkiraSS is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-01-2003, 07:20 PM   #2
dacash
Confirmed User
 
Join Date: Jul 2002
Location: some where in a basement
Posts: 609
try this

switch($HTTP_GET_VARS["id"]){
case 0: $url = "http://www.yahoo.com"; break;
case 1: $url = "http://www.altavista.com"; break;
}
header("Location: $url");
?>
__________________
____________
Marc
dacash is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-01-2003, 07:28 PM   #3
Triple 6
Confirmed User
 
Join Date: Feb 2002
Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: isN'T everything
Posts: 5,394
Quote:
Originally posted by dacash
try this

switch($HTTP_GET_VARS["id"]){
case 0: $url = "http://www.yahoo.com"; break;
case 1: $url = "http://www.altavista.com"; break;
}
header("Location: $url");
?>
That will do it.
__________________
SIG TOO SMALL! Maximum 1200x600 button and no more than 30 text lines of ALL SIZES and COLORS. Unless your sig is for a GFY top banner sponsor, then you may use a 6240x4800 instead of a 1024x800.
Triple 6 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-01-2003, 07:30 PM   #4
AkiraSS
Confirmed User
 
Join Date: Jan 2003
Location: ICQ: 17630227
Posts: 2,988
Many thanks dacash !!! Works fine now!
Thanks again 10x !
AkiraSS is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-01-2003, 07:32 PM   #5
dacash
Confirmed User
 
Join Date: Jul 2002
Location: some where in a basement
Posts: 609
no problem, always try to help people out, because someday maybe i'll need some help
__________________
____________
Marc
dacash 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.