Google
 

Wednesday, December 26, 2007

Prevent email harvesting by scrambling your email address

Frequently, one may want visitors to our website to email us and the conventional method is to use a mailto: HTML tag like

<a href="mailto:myemailaddress@gmail.com">Contact me</a>

which will be displayed by web browsers as

Contact me

However, robotic email harvester will roam the web to harvest email address from such mailto: HTML tags for spam.

There are various ways to prevent this, some more effective than others. One of them is to scramble your email address such that you get a scrambled code like

<script type="text/javascript" language="javascript">
<!--
// Email scramble script provided by http://bloggerbuster.com/tools/email/
{ coded = "wCUvvpdbUdRGKKTph@vKITC.AUK"
key = "sKnQ938wjUCOqGJfaxMZiHd2vANhe1ySWB0EmkY6ztbIol4TuRXVFP7pDrLgc5"
shift=coded.length
link=""
for (i=0; i<coded.length; i++) {
if (key.indexOf(coded.charAt(i))==-1) {
ltr = coded.charAt(i)
link += (ltr)
}
else {
ltr = (key.indexOf(coded.charAt(i))-shift+key.length) % key.length
link += (key.charAt(ltr))
}
}
document.write("<a href='mailto:"+link+"'>Click here to email me</a>")
}
//-->
</script><noscript>Sorry, you need Javascript on to email me.</noscript>


Pasting the scrambled script will cause web browsers to display a link as shown below:



Note: There is some problems. After publishing this post, the "Click here to email me" did not display in FireFox 2.0. It should work if Javascript is enabled, and it is enabled as if Javascript is disabled, you would not be able to see the Google advertisements in this blog.

Viewing this post in Internet Explorer 6 resulted in the following problem. Error message was displayed when trying to load the page in Internet Explorer 6:


Problems with this Web page might prevent it from being displayed properly or functioning properly. In the future, you can display this message by double-clicking the warning icon displayed in the status bar.

Line:600
Char:1
Error:Syntax Error
Code: 0
URL:http://good-tips-and-tricks.blogspot.com/



Clicking on the "no entry" Icon in the task bar resulted in this Privacy Report:

Based on your privacy settings, some cookies were restricted or blocked.

Web sites with content on the current page:

SiteCookies
http://www.google.com/logos/Logo_25wht.gifBlocked
http://www.blogger.com/navbar.g"targetBlogID=12..Blocked
http://www.blogger.com/img/navbar/1/corner.gifBlocked
http://www.blogger.com/img/navbar/1/flag.gifBlocked

Monday, December 24, 2007

Safety tip: place handle of hot pots, etc., inward

Here is a simple safety tip: when you have hot stuff in a pot, frying pan, etc., always place the handle inward, towards the table or other flat surfaces instead of sticking out. In this way, you can avoid scalding by hot stuff if someone accidentally knock on the handle and cause the hot stuff to pour out onto your body parts. Simple but effective. All you need to do is to remember to do it.

Sunday, December 23, 2007

Resize or crop photo without photo editor or download any program

I have always used the very good and free (donation welcomed but not compulsory) Irfanview photo editor to resize photos, screenshots, other images. I have even used it as an aid to resize Youtube video to fit into the width of blog posts (main column), and also for sidebar.

But you don't want to download programs, but still want to resize photos. Go to Online Image Resizer. Nothing to download. All done online. Just click BROWSE and locate the image saved in your computer you want to resize.

online photo resizer entry form

There are various alternatives to resize the image. You can enter the width (in pixels) you want your image to be resized to. Leave the height alone to preserve the aspect ration constant (keep image undistorted). Other alternative to to enter the height and leave the width alone. If you enter both, you will get exactly what you input, but if you entered the wrong figures, your image will be distorted (aspect ratio changed). You can also rotate the image if necessary. Once you are ready, just click OKAY and your resized image will appear with a dotted box.

resized image with Online Image Resizer

If you are satisfied with the image as it is, just right-click on the mouse outside the dotted box (for cropping) and select "Save" and save the resized image into your computer.

You may also crop the image if you want to. Hover your mouse over the dotted box and drag it to the part you want to crop. If you want to change the size of the dotted box, press the shift key and the left button of the mouse simultaneously, and the cursor will change to a double arrow head (see image at the left). Just drag the mouse until you get the size you want to crop and click the "Crop it" button at the top of the image. (note: I had no success as when I did that, I got the error message "404 not found!. Error file does not exist!. Select an image 1st. Please go back and try again!". Reason: "Please note that the crop option only works with DHTML enabled browsers!" So looks like my browser is not DHTML enabled)

Looks like I will stick to my trusty old Irfanview photo editor. This Online Image Resizer offers no real advantage and is not interesting to me.