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 12-07-2017, 08:01 AM   #1
brassmonkey
GFY HALL OF FAME DAMMIT!!!
 
brassmonkey's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Oprah's Fat Coochie
Posts: 57,697
[Tech] Redirections in PHP file

this is copied. i modified some of it.

I'm using this php jump script for my affiliate links.

Simply copy and paste following code to a text editor on your PC. I use Pspad

Code:
<?php
$v = $_GET['v'];
// In case someone calls naked php file
if ($v == '') {$link = 'http://pornstuffarooni.com/';}

// Add as many as links in below format. Each in a new line.
if ($v == 'fish') {$link = 'http://sexoidfsh.com/';}
if ($v == 'oils') {$link = 'http://fundepwe.com/';}
if ($v == 'grapes') {$link = 'http://grapeapewatreu.com/';}

// Don't change anything below this line.
header("Location: $link") ;
exit();
?>
i named the php file ads
ads.php and uploaded to /go/ directory, linking to following URL will redirect user to example1.com.

Code:
http://pornstuffarooni.com/go/ads.php?v=fish
Block Search Engines from Crawling and Indexing PHP files
We don't want Google to crawl these redirections. We can easily prevent it and other bots from crawling these files by blocking access to the directory. So open your robots.txt file and add following code to it.

Code:
User-agent: *
disallow: /go/*
__________________
Sponsors: PaperStreet | Blue Pixel | SexTronix | Basement Dollars | Amateur Models
My Services: Grunt 4 Hire | BUY MY SIG! | Buy My Hardlink Pack | 404 Traffic Sites Built
ICQ: 362<>95<>4991 | Email: [email protected] | ---------> Sig 4 Sale <---------
brassmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-07-2017, 08:50 AM   #2
rowan
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Australia
Posts: 16,851
I would also add a header that explicitly changes the HTTP response code to 302:

header("HTTP/1.0 302 redirect");
header("Location: $link");
rowan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-07-2017, 08:51 AM   #3
rowan
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Australia
Posts: 16,851
You also have no default case. If $v isn't fish/oil/grapes then your server will tell the browser to redirect to a blank URL.
rowan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-07-2017, 08:56 AM   #4
brassmonkey
GFY HALL OF FAME DAMMIT!!!
 
brassmonkey's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Oprah's Fat Coochie
Posts: 57,697
Quote:
Originally Posted by rowan View Post
You also have no default case. If $v isn't fish/oil/grapes then your server will tell the browser to redirect to a blank URL.
i actually use this. i have not had any issues. have sent over a million clicks this year through it
__________________
Sponsors: PaperStreet | Blue Pixel | SexTronix | Basement Dollars | Amateur Models
My Services: Grunt 4 Hire | BUY MY SIG! | Buy My Hardlink Pack | 404 Traffic Sites Built
ICQ: 362<>95<>4991 | Email: [email protected] | ---------> Sig 4 Sale <---------
brassmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-08-2017, 11:13 AM   #5
brassmonkey
GFY HALL OF FAME DAMMIT!!!
 
brassmonkey's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Oprah's Fat Coochie
Posts: 57,697
bump for friday
__________________
Sponsors: PaperStreet | Blue Pixel | SexTronix | Basement Dollars | Amateur Models
My Services: Grunt 4 Hire | BUY MY SIG! | Buy My Hardlink Pack | 404 Traffic Sites Built
ICQ: 362<>95<>4991 | Email: [email protected] | ---------> Sig 4 Sale <---------
brassmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-09-2017, 03:43 PM   #6
brassmonkey
GFY HALL OF FAME DAMMIT!!!
 
brassmonkey's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Oprah's Fat Coochie
Posts: 57,697
Quote:
Originally Posted by rowan View Post
I would also add a header that explicitly changes the HTTP response code to 302:

header("HTTP/1.0 302 redirect");
header("Location: $link");
added and thank you kindly.
__________________
Sponsors: PaperStreet | Blue Pixel | SexTronix | Basement Dollars | Amateur Models
My Services: Grunt 4 Hire | BUY MY SIG! | Buy My Hardlink Pack | 404 Traffic Sites Built
ICQ: 362<>95<>4991 | Email: [email protected] | ---------> Sig 4 Sale <---------
brassmonkey 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

Tags
code, copy, paste, php, simply, file, redirections, [tech]
Thread Tools




©2000-, AVN Media Network Inc



Powered by vBulletin
Copyright 2000- Jelsoft Enterprises Limited.