Using PHP file for cloaking affiliate link

Discussion in 'PHP' started by musicsmysoul, Feb 9, 2008.

  1. #1
    Hi guys :)

    Quick question... so I am trying to clock an affiliate link. I looked up several tutorials on how to do this with php, since it is effective. I have created my .php file in notepad...

    I used the following code:

    <?php header( 'Location: AFFILIATE LINK' ) ;?>

    Now that I have my php file.. where do I upload it? I use FTP.. I host wordpress on my own. I just don't know where to upload the file.

    Thank you!

    Heather
     
    musicsmysoul, Feb 9, 2008 IP
  2. yovishnurulez

    yovishnurulez Banned

    Messages:
    422
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Im a WORDPRESS GENIUS...
    You can ask for any osrt of help regarding Wordpress.
    Just PM me..
     
    yovishnurulez, Feb 9, 2008 IP
  3. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #3
    Upload it to the main directory (public_html,www,etc..).

    Then link: site.com/page.php

    Peace,
     
    Barti1987, Feb 9, 2008 IP
  4. musicsmysoul

    musicsmysoul Peon

    Messages:
    285
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I upload it along with www...public html... etc or do I actually put it in one of these folders? When I tried to just upload it to the main directory, the cloak didn't work.
     
    musicsmysoul, Feb 9, 2008 IP
  5. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #5
    If you upload file.php to the main directory, go to:

    site.com/file.php

    would you be able to access it?

    Do you have htaccess turned on?

    Peace,
     
    Barti1987, Feb 9, 2008 IP
  6. musicsmysoul

    musicsmysoul Peon

    Messages:
    285
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It works now.. :) thanks!

    However, now when I click masked affiliate link.. the new browser still shows my hop link. Is there additional php code I could add so that is masked as well?

    Thanks
     
    musicsmysoul, Feb 9, 2008 IP