GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Hey PHP Experts! Anyone have a php 301 or 302 redirect script that passes subids? (https://gfy.com/showthread.php?t=936070)

Pornwolf 10-29-2009 07:27 PM

Hey PHP Experts! Anyone have a php 301 or 302 redirect script that passes subids?
 
I know this is probably one of the most basic PHP scripts in the world, but I know jack shit about coding php.

Does anyone have the code to do a basic redirect page that can take the keyword/subid from the url and pass it on to the sponsor page?

For example: http://www.landingpage.com/index.php?subid=GFY

301 or 302 redirects

Then passes the subid GFY on to http://www.magacashbucks.com/promo.php?subid=GFY.

jMEGA 10-29-2009 07:31 PM

see this page:

http://us.php.net/manual/en/function.header.php

Pornwolf 10-29-2009 07:37 PM

That's great Mega, I will check that out and learn how to do other stuff like make a double refresh to hide the referring page.

But, I need this script right now. I don't have a ton of time for a tutorial unfortunately.

Libertine 10-29-2009 08:02 PM

Quote:

Originally Posted by Pornwolf (Post 16479721)
That's great Mega, I will check that out and learn how to do other stuff like make a double refresh to hide the referring page.

But, I need this script right now. I don't have a ton of time for a tutorial unfortunately.

In the time it took you to write that reply you could have taken a look at that page and written the script yourself :2 cents:

Pornwolf 10-29-2009 08:05 PM

I did.

<?php
$id = $_GET['id'];
$referer = $_SERVER['HTTP_REFERER'];

if($referer == "") {
header("Location: http://www.yoursponsorlnk.com/index.php?sub=$id");
}
?>


Just in case anyone does a search and comes across this page while looking for a code like it here it is. Enjoy.

Phil 10-29-2009 10:21 PM

bookmarked

Iron Fist 10-29-2009 10:35 PM

Why you guys do this in php and not .htaccess is beyond me... i'm sure your server is crying right now.


All times are GMT -7. The time now is 12:52 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123