View Full Version : Email riddler - something similar for urls?

12-08-2005, 11:12 PM
I removed access to my site's guestbook for a while because it attracted unwanted attention.
Within days of me reinstating it the scum of the internet were at it again.

Can anyone suggest something similar to Email Riddler for urls?

If not I shall just use a gif image of the book's address and add an explanation.

12-09-2005, 02:17 PM
The Email Riddler just uses an array of decimal ASCII values. You can make these into whatever you want; they needn't be an email address. For example, you@yourdomain.com would be:
121 (y), 111 (o), 117 (u), 64 (@), 121 (y), 111 (o), 117 (u), 114 (r), 100 (d), 111 (o), 109 (m), 97 (a), 105 (i), 110 (n), 46 (.), 99 (c), 111 (o), 109 (m).
Ergo, the array would be:
new Array(121,111,117,64,121,111,117,114,100,111,109,97,105,110,46,99,111,109)

You can use the following bookmarklet to translate a string to this array. Simply copy and paste the below code into your address bar and hit enter.

javascript:(function(){var s=window.prompt("Enter text:"),p="new Array(";if(s){for(i=0;i<s.length;i++)p+=s.charCodeAt(i)+(i+1 < s.length?",":"");p+=")";v=window.open();v.document.open();v.document.write(p);v.document.close();}})();
Replace the new Array(blah,blah,blah) in your Email Riddler code with the result, and obviously remove the mailto: from the link.

12-09-2005, 05:00 PM
Thank you Twey, that's great.

I saw that the numerical values were a simple substitution but didn't know they were the ASCII numbers.

12-11-2005, 12:54 PM
I'm having dificulty with document.write

On one line I want to put a mixture of plain text, then a single word which is the encoded url, more plain text, another url and then further text. I can't get the syntax right.

12-11-2005, 04:12 PM
document.write(" text goes here " + name_of_variable + " more text " + name_of_other_variable + " further text ");

12-11-2005, 10:27 PM
Sorry, I explained my requirement poorly.

When I said "encoded url" I meant the on-screen text which links to the url. (There must be recognised way of referring to it but I don't know what it is.)

This is what I have so far:

document.write('<a href="'+postsig+'"><p align="center"><font size="4" face="Arial"><strong>sign</strong></a>' + " my guestbook");

The word "sign" is what I just called "the on-screen text which links to the url."

That appears okay, followed by "my guestbook."

What I can't get to work is adding more text before the "on-screen text ..."
and another bit of "on-screen text ...."

The complete on-screen line would read something like "You can sign my guestbook, or read it."

The underlined words being links to the appropriate (encoded) urls.

I hope this makes sense.

12-12-2005, 08:19 AM
Well, you can't nest a <p> inside an <a> for a start. I think the correct term you're looking for, by the way, is "anchor text," or simply "link text."
document.write('<p style="text-align:center;font-size:4pt;font-weight:bolder;">You can <a href="' + postsig + '">sign</a> my guestbook, or <a href="' + readsigs + '">read</a> it.</p>');

12-13-2005, 01:46 PM
Thank you again. It's up and running now.

12-26-2005, 04:24 PM
..... and they're still at it.

It seems that some of the robots, or whatever they are called, read addresses disguised as ASCII numbers.

Or do they? Are they doing that or are they associating a URL with the word "guestbook" in the adjacent text?