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 Mark Forums Read
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 11-05-2001, 06:49 PM   #1
Bear
Confirmed User
 
Join Date: Jul 2001
Posts: 261
Simple PHP script need help

Hi all,

I have a redirection problem which need some php expert to help.

I have a php script in my server and a lot of webmasters point to this script. It's like:
http://www.doamin.com/top.php?username

But I need to change it to another script, I want to change it to something like:
http://www.doamin.com/in.php?id=username

Can anybody teach me to to write a redirect script for top.php? So that all request for top.php will forward to in.php and also keeep the "username" variable. Thanks a lot.

Max
Bear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-06-2001, 12:15 AM   #2
JackFoley
Confirmed User
 
Join Date: Jul 2001
Location: Pac-land
Posts: 858
Top.php should contain a line of code that checks for a username and then does some action based on the username being present or not. I forget what the variable is, I think it's $QUERY_STRING but I'm not entirely sure. Look in the script and you'll see what I mean, it should look something like this:

if (isset($QUERY_STRING)) {
[do some stuff here]
}
else {
[do something else]
}

Simply replace all the stuff it would normally do with:

$username = $QUERY_STRING;
header("Location: in.php?id=$username");

If you know a little PHP you should be able to figure it out... it's kinda hard to explain without seeing the original top.php code.

------------------
Plenty of wheat to go around.
JackFoley 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
Thread Tools



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.