Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Affiliate Redirect Question
Old 04-08-2009, 04:31 AM Affiliate Redirect Question
Novice Talker

Posts: 7
Name: Sakata Kidogo
Trades: 0
I have been trying some affiliate redirect coding,and i tried to use one that involves the creation of a folder on the domain then another folder for the offer.

If my website is 'mysite' then the offere is 'money',then i create a folder called 'go' then another called 'money' so the url is
copeac would be:

http://www.mysite.com/go/money/

Then an index file would be in the 'money' folder with the following affiliate code which leads to their signup page
< ?php
header("location:http://affiliates.money.com/signup/1026");
?>

The problem is that this does not work.Any help?
sakkid is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-08-2009, 04:43 AM Re: Affiliate Redirect Question
Novice Talker

Posts: 6
Name: Karthick
Location: In this World
Trades: 0
You might have a space or some other characters in front or last of this code

Quote:
< ?php
header("location:http://affiliates.money.com/signup/1026");
?>
Check and delete them, or use this code

Quote:
<?php
header
("Location: http://www.example.com/");
exit;
?>


__________________

Please login or register to view this content. Registration is FREE
- Autopost Videos, Articles, Amazon Products, eBay auctions etc...
vrkarthick is offline
Reply With Quote
View Public Profile Visit vrkarthick's homepage!
 
Old 04-08-2009, 09:29 AM Re: Affiliate Redirect Question
Novice Talker

Posts: 7
Trades: 0
One way you can do this is to use PHP if and else statements such as.

PHP Code:
<?
if(!$r) {
// Do Nothing //
} else {
// What you want to do //
}
?>
Using this you would then use links that look like this.

PHP Code:
http://www.mysite.com/?r=1 
And if you want to take it to the next step you can use mod_rewrite to rewrite the link and make something like this.

PHP Code:
http://www.mysite.com/1 
And then for storing the affiliate code you can use either sessions or cookies but personally I suggest that you use both just in case the user does not have cookies enabled.

Cheers!

Last edited by ryandanielt; 04-09-2009 at 03:32 PM..
ryandanielt is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Affiliate Redirect Question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11567 seconds with 12 queries