I absolutely suck at coding so I have been surfing the net to find code to mask my affiliate links. I have done every step I find that I need to do but it doesn't work. Could someone please review this and tell me what I am doing wrong. In my publichtml file I have a file named index.php which contains my landing page. I have another page titled go.php. Inside this page I have this code: <?php header( ‘Location: http://myaffiliatelink.com/1g1Xz’ ) ; ?> In my index.php file when I want to link to my affiliate page i type this: <a href="http://mysite/go.php">click here</a> every time I click on the click here link I get this error code: Parse error: syntax error, unexpected ':' in /home/mysite/public_html/go.php on line 2 I would appreciate any help you could give me. Thanks.
try this: <?php $redirect_url = 'http://x.azjmp.com/1g1Xz'; echo "<meta http-equiv=\"REFRESH\" content=\"0;url=$redirect_url\">"; @header("Location: $redirect_url"); ?> PHP: Also, the wrong part in your code is: <?php header( ‘Location: http://x.azjmp.com/1g1Xz’ ) ; ?> it should be <?php header( 'Location: http://x.azjmp.com/1g1Xz' ) ; ?> Note the right syntax of quote character.
Thanks for responding. I tried that code and now I don't get an error message but I get a blank page. It does not redirect to my affiliate page. This is driving me absolutely nuts.
Hi, Use this function <?php function FunJavaScriptRedirection($url) {?> <script type=â€text/javascriptâ€> <!– window.location = “<?=$url?>†//–> </script> <?} FunJavaScriptRedirection(â€http://x.azjmp.com/1g1Xzâ€); ?>