Archive January 2009

How to prevent hot linking?

What is hot linking?

Bandwidth theft or “hotlinking” is direct linking to a web site’s files (images, video etc). Have your ever noticed your site is having small amount of visitors comparing to the bandwidth it is consuming??

It may happen because other websites are linking your image files, videos and other resources directly from your site without uploading them in their server. This gives them the benefit that they donot need to expense their bandwidth from their host because they are stealing that from your site.

No Comments

Read more

Connect to Microsoft Access .mdb database using C#

Here is a simple example that will tell you how to connect to microsoft access (mdb) files in C# .NET. To do this you have to make use OLEDB connector

The first you need is to use OLEDB connector.

First we need to use oledb connector namespace.

using System.Data.OleDb;

Now we need to create an instance of OleDbConnection object. The following will be the connection string required to use as parameter of OleDbConnection instance object

2 Comments

Read more

Redirect non www url to www url

Search engines consider http://dscripts.net and http://www.dscripts.net as different site. So when your pages are accessible with both www and non www url your pages from referer sites and search engines break into two parts. Thus you get only half benifit from search engines.

So to optimize your search enginge referals to maximum you must use either only www or non www urls by redirecting one to another. In most in this case websites redirects non www url to www url.

No Comments

Read more

How to enable mod rewrite in apache server?

What is mod rewrite?

Mod rewrite is an apache module that lets you to rewrite url to another. You can redirect one url pattern to another using regular expression mod rewrite. You can set 404 error document when page is not found. You can also set several other features like hiding your php extensions etc. It lets you to create clean urls instead of having query strings ?type=user&name=john to user/john which is search engine and human friendly.

No Comments

Read more

Connect to mysql database using C#

I searched Internet a lot before I could figure out how to connect to mysql database server using C#. This is the one that worked in my favour.

To connect to mysql database using C# first you should have to download a small program called mysql connector .net from MySQL’s official site. Click here to visit this link to download mysql connector .net

6 Comments

Read more