Archive

Archive for the ‘Internet’ Category

Protect your site from image hotlinking

February 25th, 2010

What is image hotlinking?

In layman terms I’d put it that an image that is stored on one server is linked and displayed on another website.

This affects the original image owner as loading of the image will take up the bandwidth, so if a very popular site or forum hotlinks to a site that has bandwidth quota, it might actually kill it. Literally.

Image hotlinking can be traced from the webservers log, or if the one who did it emailed the owner, just like what happened to LiewCF here.

I actually have noticed some image hotlinking and kept it in my mind to attend to it soon.

So when time came for me to perform some maintenance on this blog, I decided to address this issue.

Found two blogspot users:

1) http://gnagababu.blogspot.com/2009/12/vodafone-htc-tatto-launched.html

2) http://tech-flood.blogspot.com/2009/11/vodafone-htc-tatto-launched.html

I have replaced the images to show NO IMAGE HOTLINKING and my site’s url http://marvinlee.net

Do you notice that the two blogposts are actually the same? It’s obvious to me he is one lazy blogger who copied content and post them with duplicates.

Anyway, how do you resolve the problem of image hotlinking on your site?

I used the script below:

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?myspace\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?blogspot\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?livejournal\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} ^http://.*$
RewriteRule \.(jpe?g|gif|bmp|png)$ /media/nohotlinks.gif [L]

It’s modified from the original script over here:
http://docs.joomla.org/How_do_you_block_direct_hot_linking_to_image_files_using_.htaccess%3F

Some other references:

http://www.yourhtmlsource.com/sitemanagement/bandwidththeft.html

http://www.blogstorm.co.uk/htaccess-mod_rewrite-ultimate-guide/

Do you have any funny or annoying image hotlinking stories to share? :-)

Cheatsheet, Internet, Open Source, blogging

It’s easier to be a famous singer through internet

February 23rd, 2010

I’m pretty sure everybody knows about Susan Boyle, who turned from a nobody to a huge somebody, after appearing in the TV programme Britain’s Got Talent on 11 April 2009 and shot to fame.



Her performance led to great international media and of course the Internet and YouTube response.

In fact, any budding singers or ambitioned singers should look into spreading their gigs on the Internet, YouTube, Facebook, Twitter, blog etc on top of existing performances in concerts, cafes etc.

It doesn’t matter where you’re from even if you only perform at home, the internet is a cheap and valuable way to fame.

Search for “Janice and Sonia”, by the time you typed ‘Jani’, the suggestion would have appeared.



Janice and Sonia are Australian twins and according to their Facebook fan page, it was stated they are still unsigned. I have no doubt they will be easily picked up as signed singers if they wanted to.

And then there’s this cute girl with her self recorded singing video spreading in Facebook, which turns out to be one Yu Kiu, Ava (Bianca) from Hong Kong.



She is a new singer in 2009 who launched a Sabah shot album back in Hong Kong.

And then back to local front, we have Malaysian singer-songwriter Zee Avi who had her debut album produced by a US record company, and hit the charts at #130 US Billboard Hot 200 Chart and #2 US Billboard Top Heatseekers Chart, and sold 6,000 copies in the United States in its first 2 weeks of release(as of June 9, 2009) according to Wikipedia.



How did she pulled that off?
Avi posted a video of her first song on YouTube in September 2007.

Now you think that’s easy? Don’t get too excited first.
It does look to me that most of the success stories are women in the first place, looks nice and sings well.

Many can try, but I’m not sure if they’ll succeed.



We’ll see their video views on YouTube. :-)

Gossips, Internet, Music , , , , , , ,

How to download, save and play facebook video

February 9th, 2010

This video download tip requires no installation of any programs, except using your internet browser only.

Some videos that are uploaded onto Facebook, are not linked directly to YouTube, and the video file is encoded, stored in Facebook’s site.

It gets a bit tricky to download and play such videos offline.

If you search with Google or any other search engines, most likely than not you will be asked to install programs. More often that not also, such programs are malwares and might install trojan horse or virus to your computer.

So, say you wanted to download a video, something like this:

Identify the URL
The URL should be in the form of http://www.facebook.com/video/video.php followed by the video id.
As an example for the above, the URL is : http://www.facebook.com/video/video.php?v=1254357076086&ref=mf

Get the video link
View the HTML source of the page.

Right click and select ‘View Page Source’ and look for the id with “video_src”.
The following link is the hidden video link.

Convert the video link
The hidden video link is actually encoded and you need to unencode or technically, unescape the HTML code.
Go to http://www.linkedresources.com/tools/unescaper_v0.2b1.html and put the video link to the encoded textarea, then click unescape.

Voila, the actual video link will be displayed below.

Download and save the file
Now that you got the link, just paste it to your browser URL bar and download it.

Ready to play
The download file, could be in mp4 format, and if your video player such as Windows Media Player is unable to play it, and you do not have the codec, try renaming the file extension from mp4 to flv.
Proceed to play the file offline with FLV Player.

Hope it works for you, just like it worked for me! :-)

Good To Know, Internet, Movies, Music , , , ,