![]() |
![]() |
![]() |
||||
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 |
Confirmed User
Join Date: Jul 2001
Location: Teh Interweb
Posts: 2,439
|
Simple Redirect Script - Recommendations?
Hi,
Im seeking a free php based script that can covert outgoing links to something like this: http://www.somedomain.com/target/?id=45 Anyone found a good one? This is low volume SE traffic so no need to handle massive volume ![]() <disclaimer> Yes ive googled the fuck out of it - just dont want to install some crap so looking for a tested one. </disclaimer> ablility to work over multiple domains a plus but not necessary Thanks! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
make a directory called "out" like yourserver.com/out/
in that folder make a file called link.txt put your outgoing links seperated by "~" like this http://site1.com~http://site2.com~http://site3.com save this as index.php Code:
<?php $url = "link.txt"; $links = file_get_contents($url); $link = explode('~',$links); $go = $link[$out]; header("Location: $go"); ?> call it like http://yourserver.com/out/?out=2
__________________
hatisblack at yahoo.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jul 2001
Location: Seattle
Posts: 340
|
Smokey! you kick ass
![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
President of Canada
Join Date: Sep 2003
Location: Leaving Hell, Entering Limbo
Posts: 23,141
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
MOBILE PORN: IMOBILEPORN
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
|
or to make it cleaner, you can do this
http://www.site1.com http://www.site2.com then use this modified version of his script Code:
<?php $url = "link.txt"; $links = file_get_contents($url); $link = explode('\n',$links); $go = $link[$out]; header("Location: $go"); ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: May 2005
Posts: 2,737
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed IT Professional
Industry Role:
Join Date: Nov 2005
Location: Hollywood, CA
Posts: 3,744
|
Quote:
Code:
if (@ini_get('register_globals')) { foreach ($_REQUEST as $var_name => $void) { unset($$var_name); } } ![]()
__________________
The Best Affiliate Software, Ever. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
You might also want to test for \r\n, FWIW.. edit that file in Mike-Rowe-Sawft Winders and that's going to be a very broken redirect script.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
MOBILE PORN: IMOBILEPORN
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
|
or better yet
Code:
<?php $link[1] = "http://www.site.com"; $link[2] = "http://www.site2.com"; $id = $_GET['id']; header("location: " . $link[$id]); ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |