Life is Beautiful. Don't ruin it with your thoughts.
Showing posts with label trick. Show all posts
Showing posts with label trick. Show all posts

Saturday, June 21, 2014

How to protect images from theft and hot linking from your website

Now I have recently been looking for a nice trick on hiding the image url, or source that I have put up on a page. Everyone who works online and posts their image/photo on their website or blog, are scared of the thought that their work may get stolen or get hot linked by anyone. Unfortunately there was no good way to do that (until now) and I decided to come for the rescue of other people like me.

In the following tutorial 'm gonna show how to completely protect a image in-spite of displaying the image into the webpage.

First create a .css file and paste the following code in it and save it:

#fp h1 a{background:url('/image.png') no-repeat;height:208px;width:155px;display:block;outline:none !important;}
#fp h1 a span{visibility:hidden;}


In the above code, change the "/image.png" with the location and name of your own image.
(For noobs) You can alter the height and width of the image by changing the variable in the 'height' and 'width' part of the second line.
I've named my .css file as style.css

Now at the <head> section of your webpage, where your image has to be displayed, we'll link our .css file we just created above, like this:

<link rel="stylesheet" href="/style.css">

Now finally we'll do the coding for displaying the image by Creating a <div> section at the place where you wanna display your image, the whole code may look something like as follows:

<div id="fp">
<h1><a href="/page" title="Some Title"><span>Some Text</span></a></h1>
</div>

Done.

Ofcourse you may dig around the above code and change it as your liking.

Now remember: There are soo many different ways to steal a image from a website, I've just shown to eliminate one (which is one of the most common way of stealing), That doesn't mean that its 100% safe. The above trick will repel all the noobs and newbies, or basically anyone whos not good with computers from copying, linking or downloading your image.






Friday, January 24, 2014

How to resume stuck/crashed downloads in firefox

In this post, I am going to teach you all, on how to resuming downloads which are stuck half way through, or crashed due to some network or server problem, from where it crashed. This is being an old 'popping-a-vein-in-your-forehead' problem with the direct downloads, we perform in our browsers. Its really frustrating when you are trying to download a huge file say 500 MB - 2 GB, and it crashes half way and then doesn't resumes, and then the only thing left for you is starting the download all the way from the start.

But no more. In this post I'll show you how to conserve the data that you have already downloaded and use it for further download, when using Firefox (I am not sure about other browsers like chrome etc yet, I have tested this trick in firefox so am recommending ff only).

Another thing to note in this trick is, this will work only on Windows OS, because we will need a little bit coding in Batch (.bat) as you will read further. So Mac. Linux etc users, better turn around from here only, sorry :-p

Soo here is the trick:

Suppose we are trying to download a 100mb file named 'file.exe', the name is 'file' and its extension is '.exe', you have to notice the filename and extension of the file you are downloading carefully in order to get this trick correct.

And now suppose our download is now stuck/crashed at some point, lets say at 45mb, i.e., at 45%.

Step 1:

Saving the 'part' file:-

a) In case the download is stuck, then there should be a part-file at the destination where you are downloading your file (file.exe) named 'file.exe.part'. A part file is a file where the current downloaded data/progress is saved and then converted into your actual file, and this whole trick revolves around this part-file only. Copy the part-file to some other folder, so that we can use it at later point, and then just cancel the download from the manager of the browser.


Follow / Like / Subscribe My Social Accounts By Clicking on The Buttons Below:
Back to top