Affiliate link cloaking with php script not working

Discussion in 'PHP' started by iphider, Jan 7, 2011.

  1. #1
    Hello, im trying to cloack affiliate links with this script

    Ive replaced the affiliate link with my own, added the php file to the root directory but when i try to visit

    www.site.com/xxxx.php

    I get a 404 error file. The file is in the directory, the permissions are good and the file names are the same but it is still not working.

    Can anyone help me out, am i missing something?
     
    iphider, Jan 7, 2011 IP
  2. shofstetter

    shofstetter Well-Known Member

    Messages:
    178
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    120
    #2
    your code looks good to me. are you getting the 404 from your page, or from the page it redirects to?
     
    shofstetter, Jan 7, 2011 IP
  3. iphider

    iphider Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    From my page
     
    iphider, Jan 7, 2011 IP
  4. iphider

    iphider Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Fixed it to something easier like abcd.php, its now working but i get this error

    Parse error: syntax error, unexpected ':'

    I am using this as a test

    <?php header(“location: http://www.test.com”); ?>
     
    Last edited: Jan 7, 2011
    iphider, Jan 7, 2011 IP
  5. shofstetter

    shofstetter Well-Known Member

    Messages:
    178
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    120
    #5
    you need to use regular double quotes:
    try this:
    
    <?php header("location: http://www.test.com"); ?> 
    
    Code (markup):
     
    shofstetter, Jan 7, 2011 IP
  6. iphider

    iphider Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    thanks.....
     
    iphider, Jan 8, 2011 IP