Are you a WiseTechie?
Get yourname@wisetechie.com


Sep 24

Amitabh Bachan started blogging on Bidadda and one fine day he releases some of his blog stats. Around 37000 visitors in the first 6 days of September, takes us the whole month to reach that number.

BigAdda also must be laughing all the way to the bank, great work from them too. So here is the thing if you are an actor/actress, start blogging. Not only will it dispell the whole thing about actors being dumb , it will also help you earn some money if you bomb at the box office (not that Mr. Amitabh Bachan is). For actors blogs may also act as bridges between fans and themselves.

I remember quite a few CEO blogs, CEO blogs inspire confidence in the company and give a platform to customers to share vital feedback with the company’s top management, something which might be prevented by corrupt mid level management. I personally am very impressed with people who hold big positions and still take out time to blog, the biggest example being Matt Cutts from Google. Others include some sportspersons and prominent journalists.

The obvious advantage to blogging if you are famous is that you dont have to go through the initial hiccup stages, a new site when started needs a lot of intellectual capital. A new site needs 100s of articles before its even notices. Wisetechie.com itself took a lot of time to get where it is today. And thanks to all our readers for their support :)


Mar 04

A word of caution for anyone using WordPress version 2.1.1 , upgrade it to 2.1.1 immediately. It appears that some crackers gained access to WordPress servers and changed a part of the WordPress 2.1.1 download code.They changed the code in two WordPress download files (“theme.php” and “feed.php”) that would allow someone to execute remote PHP code on your blogs. Thankfully the guys at WordPress detected this in time and averted a catastophe (hopefully).

Anyway i am safe now and hope your version is safe too !

Got Questions about this ?

You can email them to 21securityfaq@wordpress.org , which has been specially setup to deal with this particular problem.


Jan 30

It turns out that the site was nothing short of a scam , no embezzlement was involved but scam nonetheless. The site warlier gave free domains to people with the option of showing or not showing ads. I was one of the stupid few who signed up and made a cool TLD alias to my already existing earlier domain. With time my site became popular both on visits and search engine Page Rank. DOT Tk or .tk Page Ranks are in no way affected by the fact that they open the page in a frame. Anyway , i recently checked my DOT Tk or .tk alias and was horrified to see a 15 second counter and POP UP ads. POP UP ads are THE WORST form of advertising. Yuck, my site looks like a CHEAP for PROFIT only website now , YUCK again , so i am slowly fazing out the DOT Tk or .tk domain. So an advice to all of you , stay clear of DOT Tk or .tk domains and if you already have them , look for alternatives. The free domain is not worth it. Also there are a number of restrictions on the DOT Tk or .tk domains

1. You cant register more than 3 free domains on a email address.

2. You must guarantee a minimum number of visitors each month or they will take away your site and suspend it.

3. I have wasted a lot of time in trying favicons for the free DOT Tk or .tk domains. And i have come to the conclusion that its not possible.

4. You dont own the domain , Dot TK does , so even if your site becomes hugely popular its of little use to you, moreover you are making them money by showing the ugly DOT Tk or .tk ads.


Dec 27

I went over to a friend’s blog, and i was surprised to see the links having a tooltip which was actually the thumbnail of the site it was linking to. What a perfect way to know beforehand what the site you are going to open looks like , the service was being provided by snap.com. They have a cool domain name no doubt , but hows their service ? , I checked out the site and i was really impressed. The only thing which may deter people from using this service is the fact that the tooltip must have a link to snap.com , anyway all free services have backlinks these days. You can see the script in action on

Ankit’s Life and Technology Reviews

snap.JPG
I did not deploy the script on this blog as i still am looking if something better comes along.


Dec 19

Another one of my favourite things , the meta refresh tag is a powerful tool. A common meta refresh command will look like

<meta http-equiv=”refresh” content=”600″>

This command is put in the tag of your document. the tells that the tag is meta. The http-equiv=”refresh” sends a command equivalent to the HTTP refresh command which tells the browser to refresh the content. 120 is the time in seconds after which the page should refresh itself.

A further modification of this command exists :-

<meta http-equiv=”refresh” content=”10;url=http://wisetechie.com”>

Here instead of the page refreshing you to same URL , you are in concept redirected to a new URL.

Use these tools wisely my friends :P

I dug this from yahoo’s site

Yahoo!’s Web crawler recognizes standard HTTP result codes. The basic types of redirect recognized are:

  • 301 - Permanent Redirect
  • 302 - Temporary Redirect

This means you should keep the delay as low as possible , 0 seconds i recommend if you want search engines to think of your refresh as a hard redirect. That way SEO doesnt suffer.


    Dec 15

    The fact that i have been playing with webhosting for a long time has made me like .htaccess very much , i dont care what others say , but to me the file is indispensible and let me show you how small tasks can be easily achieved by this one file wonder. first thing first , make a test .htaccess file in a test hosting account and proceed. For those who might be confused , .htaccess is a file by the same name.

    1. htaccess file redirecting -

    .htaccess can be used to make redirects in your site , and that too very easily and these redirects work much better than javascript redirects my experience as a webmaster has taught me.

    See and Observe

    Redirect /toberedirected http://wisetechie.com/blog/

    Here tobe redirected is the old directory which needs to be redirected to the blog directory.

    For example - Redirect /tests http://wisetechie.com/blog/

    will take you to my blog directory upon entering http://wisetechie.com/tests , the change will take place automatically in the address bar

    2. Banning IPs through htaccess-

    Although most control panels come with this banning IP feature built-in , some dont , to ban an IP , paste the following into your .htaccess file

    deny from IP address

    I tried using my own IP address , getting the forbidden error was bit of excitement for me , but being able to access backend easily meant that i could easily edit .htaccess again , i would however reccomend only to ban rogue IPs which you know are trouble.

    I have personally used this command , once there was an IP from china which was basically a bot , reading my blog’s feed and copying all content for an automated site , now all it gets is a 403 forbidden page , but it keeps trying , atleast my content is secure. Later i got that IP address’s traffic null routed which basically ended the headache.

    3. Changing Directory Index through htaccess-

    This is a good tool , however DONT use it if you use automated Installation scripts as they themselves sometimes edit this information and it might result in a conflict. What does this command do then ?

    This command allows you to change the default index file of your site , for example , typing yoursite.com will make the webserver originally show yoursite.com/index.html , what if i dont want index.html but wisetechie.html , i can change that through .htaccess too.

    DirectoryIndex wisetechie.html wt.html wt.php

    The command basically sets the priority for the directory indexes through the .htaccess file , if i open mysite.com/abc/ , then first the server will search for wisetechie.html in that directory , then wt.html in that directory and if even that is not found it will search for wt.php

    4. Make Files Secure using htaccess -

    Since we are learning old school , another thing we can do easily is protect certain files or certain class of files from being viewed by external agents , an easy way to do this is by the following syntax

    # To protect .doc files

    <Files *.doc>

    Deny From All

    </Files>

    The command gives a 403 forbidden error for every .doc file that is tried to be accessed by the users.

    5. Banning Rogue Bots through htaccess-

    All bots come with user agents , some bad bots can be easily identified by their user agents and can be blocked and can help you save precious bandwidth and inturn precious money. We will discuss this in a later post , just to keep you hungry for some more.

    6. Index Ignore Command in htaccess file -

    This command again is the old school way to prevent directory listings , if i have a directory full of family images , i dont want any stranger to be able to come and list all the pictures namewise and take his pic , only people whom i have given specific URLs should be able to view my personal images.

    IndexIgnore *

    Put this in the .htaccess file of the directory you dont want anyone to be able to see , if you want specific files not to be listed you can also do that by the following modification.

    IndexIgnore *.jpeg *.jpg

    This particular command will let all files other than .jpg or .jpeg extensions to be listed in the directory listings as and when done by the user on my site.

    The Purpose -

    Although most of these are automated these days by programs such as Cpanel and other such systems , i felt it is necessary to know these as this raw knowledge is important for all webmasters , when you add a redirect or a deny entry in cpanel , you should know what is the adventurous way of doing it through your good old htaccess files. By compiling just a few of these commonly used commands i hope i have aroused interest in enough individuals as to how web site administering is actually done. :)

    Now when you are done with reading my htaccess tutorial you must realise this is just the basics of htaccess, the vegetables for the roasted vegetables (ok , i know , bad joke , i mean htaccess can be used as a foundation for bigger things) , you got to put the bits and pieces together to create a masterpiece. For those of you wondering what can we do with a .htaccess file , Here is something Rohit cooked up for us(using htaccess and php) over at his blog

    Just goes to show a little programming + a smart brain can make small and witty things which you wouldnt have imagined in your wildest dreams otherwise.

    Now you guys have probably seen that the avatars on this forum are static, they have to be manually changed before you can use a new one. :-?
    Now take a look at my avatar url
    http://www.smart-techie.com/images/avatar.gif
    Now what happens when you view it? You see a jpg or a gif image.
    Try accessing the same url 5 or more times… Did you notice something?
    The picture changes automatically at random (amongst a set of 3 pics) If you didn’t see this try more times ;)
    How does it happen?
    The first part is a VERY simple php script on my webserver (you need a hosting account with php scripting enabled for running scripts). Also (in Linux) CHMOD the files to give execute permission to everyone.
    The php code that I am using is

    php
    $random = rand(1,3);
    
    switch ($random)
    
    {
    case 1:header(location: /images/konqi.jpg ) ;
    
    break;
    
    case 2:header(location: /images/Homer.gif ) ;
    
    break;
    
    case 3:header(location: /images/Hobbes.gif ) ;
    
    break;
    }
    
    header(Cache-Control: no-store, no-cache, must-revalidate) ;
    
    header(Cache-Control: post-check=0, pre-check=0, FALSE) ;
    
    header(Expires: Mon, 26 Jul 1997 05:00:00 GMT ) ; // Date in the past
    
    header(Pragma: no-cache) ;
    
    ?>

    Doesn’t take a genius to figure out what is going on here. Anyways I’ll explain :)
    1. A random number is chosen between 1 and 3 and the corresponding image is displayed. This is done by the header function which is used to send HTTP headers ( a temporary redirect HTTP 302 response) This says that the resource that you want to see is at some other location).2. The headers at the end are DESPERATE ones which tell the browser “Please don’t cache the images or you will spoil my image changing effect?” Now to save bandwidth and load pages faster, browsers store copies of resources that they retrieved from the Internet on your disk in a location called cache/Temporary Internet files or similar location. Try about:cache in mozilla to see whats in it.
    Also an expiry date is given in past so that the browser thinks “Oh, this content that I retrieved has become old. I shouldn’t cache it. Next time I’ll ask for a fresh copy” Sweet…
    Now the file is saved as somename.php on your server and on running it the effect of changing avatars is complete.
    2. Now for the final bit. Try pasting this url in your avatar field and the forum complains. It wants the URL to end in gif/jpg or whatever. So how to bypass this? Simple. Use the Apache .htaccess file (not available on IIS)
    .htaccess is a file that stores settings on a folder basis on you webserver. I modify this file to add a statement

    Redirect /avatar.gif http://www.website.com/images/somefile.php

    There you have it! It is always easy to fool software.
    Try this at least once to see the power of web scripting.


    Dec 14

    I really hope this post is preserved in time because i feel like a moron having to read up how to restore databases each time and its very easy except maybe if you get in a tight corner. Here we assume we have to backup and restore a database with username@localhost account. The problem with such an account is that it will not have database creation priviliges in many hosts so you will basically kill yourself trying to figure out how to go about this. I assume that your host has disabled the backup facility of Cpanel or you dont have Cpanel (in which case :: GET A LIFE !!! or maybe a good host). Images look a little hazy but you dont really need them , just follow the instructions and backup everything before proceeding , wait , thats what we are doing !!! , ok i stink at situational humour :-|.
    Part 1. Backup Your Database in PHP My Admin

    Login to your control panel , click on PHP My Admin , if this option is not there and an option My SQL databases is there , open it instead and then click on PHP My Admin.
    PHP My Admin Screenshot

    Click on Export , you will be able to select one or all of your databases , i leave the other options untouched , do the databases one by one , you will know why later on.

    Export Database Screenshot

    You will be treated to a file with SQL queries , copy the queries and save it in a txt notepad file or anything which doesnt spoil the commands.

    Part 2. Restore Your Database in PHP My Admin

    Login to your control panel , click on PHP My Admin , if this option is not there and an option My SQL databases is there , open it instead and then click on PHP My Admin.

    Rewind !!!! , this wont work , if you see your SQL commands carefully , they have a create database command , however your account , username@localhost has no database creation priviliges , this is where you will be pulling your hair out like i was , you may create as many users as you like but you wont be able to login with them and further blah blah blah , breaking 3-4 cups later when you regain your senses we continue. Some of you may have already realised the workaround.

    Why had we created the backup database wise , there was a reason. We first create the database through the my SQL databases section , then we remove the database creation command from the query backup and also the database ‘USE’ command.


    Now going into the PHP My admin , we select the database from the sidebar , click on the SQL button and paste our queries and execute them.

    We live happily ever after , although this tutorial might appear non-sensical to you but to a person actually facing the problems i have outlined , rest assured this page is a gold mine of information.


    Nov 25

    We understand not everyone can afford domain names , so we list to you sites which provide you with free domain names. Although if you want a .com or .org or other such domain names free , you must be lucky or have a lot of free time to participate in forums.

    1.Dot.tk Domains - They offer you a free yourname.tk domain name , but there are a few catches as well. Your site must get a minimum number of visitors to keep your domain. The .tk sites opens your choice of URL in a frame. You cant use your own favicon with a free .tk site.


    2. .Co.nr Subdomains - These are not actually free TLDs, they are actually subdomains which give the feel of a TLD , you can get a yoursite.co.nr site , but you must place their button ad onyour site..

    3. Zoomcities.com - As a part of its second anniversary celebrations , Zoomcities now offers its forum members a chance to get a .info domain name free of charge. All you have to do is to apply on the forums telling why you should be the one to get that domain.

    4. Hostbidder.com - The site offers people to post to get a domain , once you reach the required HBPoints (Currency of the forum) , you can request for a domain name.
    Hostbidder.com

    This article is part of webmaster section on Wisetechie.com Main site