Sign up with your email address to be the first to know about new products, VIP offers, blog features & more.

All Posts By Mup

Hotlinking mp3 files

By Posted on 1 No tags 0

Just noticed that my blog was eating +1GB bandwidth per day, and after consulting the logs, guess what? mp3skull.com and some other bastards 🙂 are hotlinking all my mp3’s. All that because of THIS! That’s what happens when you leave your folders opened for access. They are scanning folders for mp3’s and then indexing the content.

Are you dealing with the same shit?
You can block this simply trough .htaccess. Take mine for example:

[pastacode provider=”manual” lang=”markup” message=”htaccess mp3 files hotlinking protector”]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://paraschiv.me$ [NC]
RewriteCond %{HTTP_REFERER} !^http://paraschiv.me/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.paraschiv.me$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.paraschiv.me/.*$ [NC]
RewriteRule .*\.(mp3|wav|avi|flv|zip|rar)$ - [F,NC,L]
[/pastacode]

Replace wav|avi|flv|etc to match your needs, or just simply delete them and leave (mp3) to only protect mp3 files.
This technique protects also the “right click save as” issue. Apparently, some old htaccess snippets would prevent the hotlinking but when right clicking and saving as.. the protection was bypassed.

Hotlinking mp3 protection

If anyone wants to test my protection, go here:
http://mp3skull.com/mp3/dj_sammy_yanou_heaven_feat_do.html
They were hotlinking this from me:
http://paraschiv.me/wp-content/uploads/2011/11/01-DJ-Sammy-Yanou-feat.-Do-Heaven.mp3
At this moment, on that mp3skull page, my hotlink was displayed second on the list. Mouse hover the green download menu from the second result and see if it matches my url and test it out! However, I believe that by the time you’ll see this, my hotlink would be gone from their site.
Well, this is the only hotlinking mp3 files protection technique that works at this moment.
Good luck!

WordPress – Forbid browsing uploads directory folder

By Posted on 1 No tags 0

Prevent people from browsing your wordpress uploads folder

Simplest solution is usually the best

I have never thought that wordpress would permit browsing freely within wp-content/ folders. Today I have finally (wtf?) realized that my folders are opened for everyone to browse them. Well, I’m no blogger with golden content or a merchant selling online products, so I’m not that concerned about this, but I took it under consideration and searched for solutions.
This is how people would access my wordpress uploads folder and search for //gold//:

Prevent visitors from browsing your wordpress uploads folder
Type this: “index of /wp-content” on google and you’ll see the enormous amount of wordpress folders opened for everyone to access.

First solution shared everywhere is to restrict access via htacces, but that would be very risky as you may end up loosing google indexing your images/etc.
The second would be some outdated plugins…
I have never been a fan of too much plugins; the simpler the better.
So here I am giving you the simplest solution to solve this.
Create a file named: index.html and go to your wp-admin interface, then click Media -> Add new -> and upload index.html via the upload manager and you are done!
This is what visitors will get when browsing the same folder from the screenshot above:
wordpress-browse-upload-folder-denied
http://paraschiv.me/wp-content/uploads/2013/12/
Of course, you need to customize your own html file that fits your needs. I used a photo of my son to animate the page (^_^)

You may laugh at this, but this simple solution is highly sufficient for me.
You should know that, if you configured your blog to organize uploads into month- and year-based folders, you have to upload the index.html file every month (ô_Ö) as wordpress generates folders monthly for your uploaded content.
This way, you stay plugin free and out of trouble.

Related article:
http://paraschiv.me/2014/01/hotlinking-mp3-files/

Auenheim – The Heart Village

By Posted on 0 No tags 0

Ce matin, je cherche le jeux Wii Mario Kart sur leboncoin, et j’en trouve un à Auenheim, pas loin de chez moi dans le Bas-Rhin.
Et, en cherchant sur google maps la location exacte, voici ce que je decouvre, une commune en forme de cœur. Trop chou!! ^_^
Isn’t that cute? 🙂

auenheim commune en forme de cœur

Auenheim - the heart village

Bootstrap share to facebook and twitter custom buttons for wordpress

By Posted on 0 No tags 0

How to create custom buttons replacing the standard share to facebook or twitter, also.. opening in a small window.
There’s not much information about implementing your own buttons within wordpress, so here it is. May come in handy for someone.
My example is using bootstrap to render the buttons. You can use it with your own style, of course.

share-bootstrap

 

 

Share on twitter custom:
[pastacode provider=”pastebin” lang=”markup” path_id=”WXjUt4yv”/] Share on facebook custom:
[pastacode provider=”pastebin” lang=”markup” path_id=”iVHeEv0q”/]