| | #1 |
| Warrior Member Join Date: 2011 Location: ZG
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
hi i'm building my first site as affiliate and,as expected i have one problem. i want to cloak aff link,i followed instructions but seems it doesen't work for me,i'm getting this message when i enter that link itno browser: Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home3/howtobes/public_html/go/fatlossfor.php on line 2 Parse error: syntax error, unexpected ':' in /home3/howtobes/public_html/go/fatlossfor.php on line 2 I did everything step by step.. anybody knows what does that message means? thanks |
| |
| | #2 |
| HyperActive Warrior War Room Member Join Date: 2008 Location: Carl Junction, MO
Posts: 297
Thanks: 1
Thanked 56 Times in 41 Posts
|
Can you show us your code in fatlossfor.php?
|
| |
| | #3 |
| Active Warrior Join Date: 2011
Posts: 83
Thanks: 7
Thanked 12 Times in 9 Posts
|
Im in the same exact shoes as the OP, same error message. My php code is <?php header('Location: myaffiliatelink’); ?> (my affiliate link is in there, im not supposed to share that right?) Thanks in advance |
| |
| | #4 | |
| <?php echo("Hello"); ?> Join Date: 2011 Location: EU
Posts: 197
Thanks: 3
Thanked 27 Times in 27 Posts
|
@op: post the php code inside fatlossfor.php otherwhise we cant really help you! | |
| |
| | #5 | |
| Active Warrior Join Date: 2011
Posts: 83
Thanks: 7
Thanked 12 Times in 9 Posts
|
Fatal error: Call to undefined function phpheader() in /home/diablo/public_html/bestshowerheadinfo.com/go/revitalizingshowerfilter.php on line 1 i appreciate the help ive been trying to figure this out for days its driving me crazy. lol | |
| |
| | #6 |
| Active Warrior Join Date: 2011
Posts: 83
Thanks: 7
Thanked 12 Times in 9 Posts
|
this is what i changed it to <?php header('Location: myaffiliatelink'); ?> |
| |
| | #7 | |
| <?php echo("Hello"); ?> Join Date: 2011 Location: EU
Posts: 197
Thanks: 3
Thanked 27 Times in 27 Posts
|
Also: do you have any special chars in your URL? That could also cause problems... Edit: What editor are you using? Could it be that the white space between <?php and header has been removed by your editor? If you have only copied and pasted the code, make sure there is a whitespace between <?php and header ! Edit 2: Before you paste the whole code here, try to follow my suggestion in the first edit | |
| |
| | #8 |
| Fabrizio Van Marciano Join Date: 2011 Location: Cornwall, England
Posts: 47
Thanks: 11
Thanked 3 Times in 3 Posts
|
Hey this might help you it works a treat for my affiliate links ![]() <a href="productname" onmousedown="this.href='affiliate-link-url-here';">Product Name</a> |
| |
| | #9 | |
| <?php echo("Hello"); ?> Join Date: 2011 Location: EU
Posts: 197
Thanks: 3
Thanked 27 Times in 27 Posts
|
Sorry, but how is this supposed to help??? Please stop spamming and just trying to get your post count to 50. And btw. why would you use such a stupid code format when you can simply do <a href="your-aff-url-here">Name</a>. Whats the point of having the product name in the href tag? Anyways, back to topic: @op: ignore that comment and try to check for a whitespace | |
| |
| | #10 | |
| Active Warrior Join Date: 2011
Posts: 83
Thanks: 7
Thanked 12 Times in 9 Posts
|
| |
| |
| | #11 |
| <?php echo("Hello"); ?> Join Date: 2011 Location: EU
Posts: 197
Thanks: 3
Thanked 27 Times in 27 Posts
| |
| |
| | #12 |
| Active Warrior Join Date: 2010
Posts: 32
Thanks: 0
Thanked 6 Times in 3 Posts
|
Remember to put an exit(); after any PHP header redirects not doing this will cause PHP to continue to load the page before redirecting. the exit(); stops this. If I was a hacker (which i choose to not be) I could easily target sites that use only header: location redirect to gain access to content that shouldnt have been viewable. My method of attack would be command line fgets which can stop the redirect completely. Just a friendly note.. By the way! Theres great info on this forum! Good stuff guys. |
| |
|
| Bookmarks |
| Tags |
| cloaking, link, problem |
| |