Greenguy's Board


Go Back   Greenguy's Board > General Business Knowledge
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2007-01-09, 09:45 AM   #1
Simon
That which does not kill us, will try, try again.
 
Simon's Avatar
 
Join Date: Aug 2003
Location: Conch Republic
Posts: 5,150
Send a message via ICQ to Simon Send a message via AIM to Simon Send a message via Yahoo to Simon
Make more money by making sure your links are valid html

I know that many webmasters don't bother validating their code. Not a good idea, for a variety of reasons. One of them is that unless you're validating your html code, you may never see any warnings to let you know that the sponsor links in your html pages may not be valid. And if they're not valid, it's possible that a surfer's browser won't read those links correctly, which could result in you not receiving credit for some of your sales.

The text below is from this page. It may help explain what I mean about sponsor links...

Ampersands (&'s) in URLs

A common error occurs when including a URL which contains an ampersand ("&"). Take a look at this example:
Code:
<!-- This is invalid! --> <a href="foo.cgi?chapter=1&section=2&copy=3&lang=en">...</a>
This example generates an error for "unknown entity section" because the "&" is assumed to begin an entity reference. Browsers often recover safely from this kind of error, but real problems do occur in some cases. In this example, many browsers correctly convert &copy=3 to ©=3, which may cause the link to fail. Since &lang; is the HTML entity for the left-pointing angle bracket, some browsers also convert &lang=en to ?=en. And one old browser even finds the entity &sect;, converting &section=2 to §ion=2.

To avoid problems with both validators and browsers, always use &amp; in place of & when writing URLs in HTML:
Code:
<a href="foo.cgi?chapter=1&amp;section=2&amp;copy=3&amp;lang=en">...</a>
Note that replacing & with &amp; is only done when writing the URL in HTML, where "&" is a special character (along with "<" and ">"). When writing the same URL in a plain text email message or in the location bar of your browser, you would use "&" and not "&amp;". With HTML, the browser translates "&amp;" to "&" so the Web server would only see "&" and not "&amp;" in the query string of the request.

--
__________________
"If you're happy and you know it, think again." -- Guru Pitka
Simon is offline   Reply With Quote
Old 2007-01-09, 10:43 AM   #2
j3sUS183
They have the Internet on computers, now?
 
Join Date: Jul 2005
Posts: 142
You can see all entities here

Last edited by j3sUS183; 2007-01-09 at 11:32 AM..
j3sUS183 is offline   Reply With Quote
Old 2007-01-09, 11:06 AM   #3
Simon
That which does not kill us, will try, try again.
 
Simon's Avatar
 
Join Date: Aug 2003
Location: Conch Republic
Posts: 5,150
Send a message via ICQ to Simon Send a message via AIM to Simon Send a message via Yahoo to Simon
To be clear.

Tags are something used in blog posts.

What we're talking about here is encoding character entity references and the things on the page you posted are called entities and not tags.

Too much confusion about things already. Best we call things by their real names.

__________________
"If you're happy and you know it, think again." -- Guru Pitka
Simon is offline   Reply With Quote
Old 2007-01-09, 11:11 AM   #4
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
Didn't Toby mention a couple months back that you shouldn't change the & to &amp; in CCBill links since it'll muck up something at their end?
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Old 2007-01-09, 11:17 AM   #5
Simon
That which does not kill us, will try, try again.
 
Simon's Avatar
 
Join Date: Aug 2003
Location: Conch Republic
Posts: 5,150
Send a message via ICQ to Simon Send a message via AIM to Simon Send a message via Yahoo to Simon
I'm not sure but I'll look for that thread.

The idea here is that the "&amp;" only appears in the raw html code sent from the server and it is translated by the browser into the "&" that was there originally. So the link click sent to CCBill (or anywhere else) shouldn't have the "&amp;" in them by that time.

Time to look for that thread.

Maybe someone from CCBill can stop by to comment on this too.
__________________
"If you're happy and you know it, think again." -- Guru Pitka
Simon is offline   Reply With Quote
Old 2007-01-09, 11:25 AM   #6
j3sUS183
They have the Internet on computers, now?
 
Join Date: Jul 2005
Posts: 142
Quote:
Originally Posted by Simon View Post
To be clear.

Tags are something used in blog posts.

What we're talking about here is encoding character entity references and the things on the page you posted are called entities and not tags.

Too much confusion about things already. Best we call things by their real names.

Of course you're right

Sorry for mistake
j3sUS183 is offline   Reply With Quote
Old 2007-01-09, 11:40 AM   #7
Simon
That which does not kill us, will try, try again.
 
Simon's Avatar
 
Join Date: Aug 2003
Location: Conch Republic
Posts: 5,150
Send a message via ICQ to Simon Send a message via AIM to Simon Send a message via Yahoo to Simon
Okay, found that thread...
http://www.greenguysboard.com/board/...ghlight=ccbill

I think we need to get a CCBill rep in here. Otherwise we're going to be talking about every link to CCBill *needing* to be coded as invalid html in order to get paid.

And if that's the case, then CCBill and all the affiliate programs using them need to get the word out to the webmasters who may be wasting their time writing syntactically valid html.

(j3sUS188 - no worries, I know you were trying to help)
__________________
"If you're happy and you know it, think again." -- Guru Pitka
Simon is offline   Reply With Quote
Old 2007-01-09, 11:56 AM   #8
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
The issue at that time was whether the link was coded in html (which does work) or done through a redirect script (which of course doesn't work)

If you code the html in the links, most browsers will de-entify prior to sending the request to ccbill, in which case you get credited. There were some strange browser versions that didn't de-entify properly which caused some issue. I would bet that less than 1% of the browsers don't properly handle entities in urls now.

However, if you are coding the link and sending it through a php redirect script,

Code:
<?php
header("Location: http://www.ccbill.com?asdf&amp;pa=1234");
?>
will not get translated properly on ccbill's side. Granted, the link is not in proper form, but, its so prevalent that I think ccbill (and any other affiliate program depending on an & or ? in the url) should properly try to de-entify the url before processing. Almost every traffic trading script will entify the url when it is placed in a database and redirect the surfer via an entified link.

I don't recall the exact syntax, but, you could always wrap the stuff that doesn't validate in CDATA blocks which would allow those urls with & to validate.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2007-01-09, 12:19 PM   #9
Licker4U
Mean people suck, nice people swallow, are you mean or nice?
 
Licker4U's Avatar
 
Join Date: Sep 2003
Location: Lower Alabama-The Redneck Riviera
Posts: 2,376
Send a message via ICQ to Licker4U Send a message via AIM to Licker4U
Quote:
Originally Posted by Useless Warrior View Post
Didn't Toby mention a couple months back that you shouldn't change the & to &amp; in CCBill links since it'll muck up something at their end?
The very first site I built I used Front Page and it automatically changed all "&'s" to &amp;. I was told not to use Front Page and hand code everything, which I did. I was told that changing the & to &amp; was only if you wanted the & to actually show up on a page. I have a LOT of affilitate links, not just to CCBill, that just have the & in the affiliate code.

Shouldn't ALL affiliate codes that have & in them be left as & and NOT be changed to &amp;?
Licker4U is offline   Reply With Quote
Old 2007-01-09, 12:20 PM   #10
Simon
That which does not kill us, will try, try again.
 
Simon's Avatar
 
Join Date: Aug 2003
Location: Conch Republic
Posts: 5,150
Send a message via ICQ to Simon Send a message via AIM to Simon Send a message via Yahoo to Simon
Quote:
Originally Posted by cd34 View Post
Almost every traffic trading script will entify the url when it is placed in a database and redirect the surfer via an entified link.
That's one more reason for sponsors not to use the standard CCBill link structure (or any structure that uses the '&' character in their links).

It's much better* to be able to link to a paysite using something like:

http://www.PaysiteName.com/?r=123456

There's no need to encode anything in that link address. The sponsor just needs some php code on the index page of 'PaysiteName.com' to grab the '123456' and stick it in an UNencoded "refer.ccbill.com/cgi-bin/..." address and send that along to CCBill to get the cookie set. CCBill sends the surfer back to the paysite immediately and it's like nothing special happened at all to the surfer.

The same thing applies on links to HFS and FHG. On those I like the idea of embedding the code somewhere inside the url instead of sticking it on the end, but either way, I think that getting rid of the '&' character in any and all links given to affiliates is something that all sponsors should do.


--
* When I say 'better' I mean from the standpoint of the affiliate webmaster. Obviously it might be financially attractive to a sponsor if some/many of the incoming signups didn't require any commissions to be paid out.
__________________
"If you're happy and you know it, think again." -- Guru Pitka
Simon is offline   Reply With Quote
Old 2007-01-09, 02:30 PM   #11
msanchez
It is better to watch things then to do them
 
Join Date: Sep 2004
Location: The Thumb
Posts: 484
Quote:
Originally Posted by cd34 View Post

However, if you are coding the link and sending it through a php redirect script,

Code:
<?php
header("Location: http://www.ccbill.com?asdf&amp;pa=1234");
?>
will not get translated properly on ccbill's side.
I send alot of my ccbill links right through a php redirect as your example shows and I have never done anything but use the exact ccbill code and I get plenty of sales like that.

Im keen to explore adding the "&amp;" but hesitant because I dont want to break whats working.

Is it possible that some sales would still register with the default code but not as many as would register is using "&amp;" when using a php redirect?

Good thread here, but kinda confusing to a non technophile like myself.
__________________
I buy text links, clicked traffic, blog posts, and more! Hit me with a pm.
msanchez is offline   Reply With Quote
Old 2007-01-09, 03:05 PM   #12
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
Quote:
Originally Posted by msanchez View Post
Is it possible that some sales would still register with the default code but not as many as would register is using "&amp;" when using a php redirect?
With the php redirect, the web browser doesn't have the opportunity to de-entify the URL. It's like copying and pasting a URL right into the address bar. If you are using that linking method, there's no reason to worry about validation of the php redirect. There's no page to validate.
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Old 2007-01-10, 08:40 AM   #13
msanchez
It is better to watch things then to do them
 
Join Date: Sep 2004
Location: The Thumb
Posts: 484
Quote:
With the php redirect, the web browser doesn't have the opportunity to de-entify the URL. It's like copying and pasting a URL right into the address bar. If you are using that linking method, there's no reason to worry about validation of the php redirect. There's no page to validate.
Thanks for the clarification UW.
__________________
I buy text links, clicked traffic, blog posts, and more! Hit me with a pm.
msanchez is offline   Reply With Quote
Old 2007-01-10, 11:30 AM   #14
Wanderer
Aw, Dad, you've done a lot of great things, but you're a very old man, and old people are useless
 
Wanderer's Avatar
 
Join Date: Mar 2005
Posts: 22
Send a message via Yahoo to Wanderer
Interesting discussion -- how can we validate our code? Should we use the w3.org?
Wanderer is offline   Reply With Quote
Old 2007-01-10, 03:27 PM   #15
tickler
If there is nobody out there, that's a lot of real estate going to waste!
 
tickler's Avatar
 
Join Date: Dec 2003
Posts: 2,177
Quote:
Originally Posted by Useless Warrior View Post
With the php redirect, the web browser doesn't have the opportunity to de-entify the URL. It's like copying and pasting a URL right into the address bar. If you are using that linking method, there's no reason to worry about validation of the php redirect. There's no page to validate.
You have to be careful with a few of the ad scripts though. They have a tendancy to insert the &amp sometimes. When setting things up, it's best to also go look at the source code to check the actual link. I found a PPC advertiser that works OK unless I go do maintenance on the link. The script then pops it to a &amp and I was wondering why the hits weren't counting at ccBill..
__________________
Latina Twins, Solo, NN, Hardcore
Latin Teen Cash
tickler is offline   Reply With Quote
Old 2007-01-10, 04:19 PM   #16
virgohippy
Madness is like gravity. All it takes is a little... push.
 
virgohippy's Avatar
 
Join Date: Feb 2006
Location: California
Posts: 1,679
Thanks for the tip Simon. I think I'm going to make a few adjustments to the way I do things now.
__________________
~Warm and Fuzzy.
virgohippy is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:56 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc