php redirect to another page

Moderator: youngmoney

<<

Teoykk

Posts: 10

Joined: Sat Jan 02, 2010 6:19 pm

Post Sat Feb 19, 2011 2:43 am

php redirect to another page

I'm a newbie in php.Recently I just want to begin to do affiliate marketing.Someone told me it's better to cloak affiliate urls in order to get better results.Then how to cloak affiliate urls with php?What I mean is redirecting to another page and the visitor can't see the affiliate link directly.
<<

mickni

Posts: 150

Joined: Thu Dec 31, 2009 10:50 am

Location: NY

Post Fri Mar 18, 2011 9:30 am

Re: php redirect to another page

I usually use the link below to cloak affiliate links,it works well for me,you just need to add new line like this
  Code:
$links['http://www.affsite.com'] = 'http://afflink.affnetwork.com/click/i2ptmmXKfZ3ZG6cX5w' ;

after it,save this file as redirect.php,upload this php file to the root of your hosting,when you need to use this,just visit www.yourdomain.com/redirect.php?site=http://www.affsite.com
that's it
  Code:
<?php
    $site = $_GET['site'];
    $links = array();
    $links['http://www.affsite.com'] = 'http://afflink.affnetwork.com/click/i2ptmmXKfZ3ZG6cX5w' ;
# redirection
    header('Location: '.$links[$site]);
    ?>
All the secrets you need to know about how to make money online


  • Advertisement

Return to Advanced Programming

Who is online

Users browsing this forum: No registered users and 0 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.


phpBB SEO
Time : 0.115s | 12 Queries | GZIP : Off