The best way to earn online

I’ve come across many sites, forums and blogs teaching thousands of methods to earn online. Some would really zoom past your head if you don’t know basic marketing tricks. There are Paid To Click, Paid to Post, Paid to Read, Paid to Write and Paid To *insert anything here*. XD

Anyways, I’ve tried various methods but succeeded in none of them. Maybe because I get bored easily and don’t have so much patience. People would wait for months to earn 10$ from a Paid To Post forums. I just can’t do that. I can’t really post to get paid. If I feel like posting, I will… if I don’t, I won’t. So, these methods were pretty useless for me.

The method that worked for me the best was Freelancing. No, freelancing just doesn’t mean programming. You can freelance for almost anything including writing, designing, programming.. anything you are good at. Freelancing is something you’d love to do. It’d make utilizations of your skills and earn you some money. It will help you earn much more than any other method. Many people do full time free lancing and easily earn their living with it.
Their are many websites offering freelancing services to users all around. Some of them the best are:

1. Scriptlance.com

2. Elance.com

3. Getafreelancer.com

4. Rentacoder.com

5. Limeexchange.com
There are hundreds of more sites like these just a Google away. You can try your skills on these sites and monetize your talent and earn 1000s of bucks weekly/monthly depending upon your capability.

Stop wasting time in other online earning programs. Instead, take some time to develop skills and get on these sites to earn lots of money. No need to start websites or clicking on ads. Just exploit your talent.

Peace!

Happy earning online!

Solution to “MySQL Server Has Gone Away” Problem

Seriously guys, I got this error and I was laughing hard. The error is just too funny, don’t you think? Yes, it is but not for developers like me. Problem to this error is almost undetectable and there are more than a dozen reasons as to why this occurs and this often baffles developers.

This error generally comes when :

MySQL connection times out.

The MySQL server shuts down.

The connection is interrupted.

The query you are performing is too large for server to handle.

The query you are performing takes more space than allowed (default: 16MB).

While these are some common reasons, there maybe some unknown reasons to come across this error. I faced one of those unknown reasons.

My PHP code looked somthing like this:

<?php

function one()

{

….

}

function two()

{

….

}

function connect2db()

{
…..    //this connected to db

}

// Around 10 more functions

// Then:

connect2db();

one();

two();

/* Couple more function calling, a few loops, a few conditions and then the query: */

query = “Select id from users”;

$result = mysql_query($query) or die(mysql_error());

?>

I just tried so many solutions to solve the problem. I copied the query and pasted it in phpmyadmin to check if there was a problem with the query but it was not. The problem was on the PHP side.

When I tried everything else, including repairing and optimizing the tables and changing tables’ engine to innoDB, and the problem wasn’t solved, I just changed my code to immediately execute the query after the connection. For that I modified my code to look like this:

<?php

function one()

{

….

}

function two()

{

….

}

function connect2db()

{
…..    //this connected to db

}

// Around 10 more functions

// Then:

one();

two();

/* Couple more functions calling, a few loops, a few conditions and then the query: */

query = “Select id from users”;

connect2db();

$result = mysql_query($query) or die(mysql_error());

mysql_close();

?>

I did this at every instance of query, and voila the problem disappeared.

Happy developing, Guys!

Cheers!

Searching for a text string in all files and directories recursively in PHP

Sometimes you need to edit some part of your website and unfortunately it isn’t made by you. You will, obviously, need to search for the file in which that particular part of site exists. In CMSs/forums/blogs, it get really hard to search it manually.

I was having a similar problem. I needed to edit the footer of my site http://www.techmindz.com but I didn’t know which file, out of 100s, had that particular part. I just made a script for that.

<?php

$query=escapeshellarg($_GET['str']);

$query="find . -exec grep -l $query {} ;";

system($query);

?>

Save this file as textsearch.php in your root directory. Now visit the site www.yoursite.com/textsearch.php?str=yoursearchstring

And voila! You get the results.

Peace!

DisclaimerPlease note that this should be used only by webmasters as a quick tool to find specific strings within all files without having to download all the files to local computer. While this method is not recommended, this can be used as a temporary tool only. This file (textsearch.php) should be deleted as soon as your work is done with it for security reasons. I won’t be held responsible for any damages caused.

Moved my blog to new domain

You might be shocked but I moved my blog to a new domain – www.absolutelytech.com, just after one day at www.insanelyme.com .
Actually, that blog was more of a general life-based blog. I felt it wasn’t suitable for a tech blog. Hence the new name.

It roughly took me 5 minutes to do the job. Thats the magic of wordpress. I just love it.

Thats all fellas.

Hope you like the new domain.

Got a new domain for my blog (How I moved my blog to new domain)

Just bought www.insanelyme.com for my blog. As I consider myself insane (most of you will agree with that), I found this name suitable for my blog. I bought it in the same instant when I saw it was available.

I added the domain in cPanel as addon domain but unfortunately it didn’t support second level directory (example.com/tech/blog). So I copied all the files from the directory and pasted it in a directory on top level. I pointed the domain to it and it worked. I changed the Blog URL in admin panel and it worked.

Now, there was this problem of redirection. There always is a problem of 301 redirection with new domains. I had Page Rank and pages listed in search engines which I didn’t want to lose. So, I needed a 301 Permanently Moved redirect. I made a .htaccess file in my old directory and put this:

redirect 301 /blogs/ http://www.insanelyme.com/

I figured this out after a dozen of commands including mod_rewrite. Finally, this worked like a charm.

Bluehost – the best host out there?

Before providing a review for Bluehost, I’ll take to back to the days when I knew nothing about web. When I say nothing, I just didn’t know anything except for normal browsing. Yeah, you heard it right. Through some googling and stumbling on an unknown page, I found out about adsense and its success stories. I made up my mind to do the same and start earning. I had big plans… like earning in thousands of dollars per month. Everything was set. I decided to create a forum but I didn’t have any hosting. I tried few simple scripts on free hosting and I was successful to install them. I forgot to mention – even though I wasn’t familiar with how web worked, I was still a tech savvy out of the web. I could program very well in C/C++ and could troubleshoot almost all of the software and hardware problems myself. So, I tried PHPBB on a free host and I needed a hosting account now to go professional.

After reading some reviews on internet, I found out that bluehost was quite good. Without a second thought, I asked my uncle for a credit card and registered for an account. The cPanel they provide is quite good – nicely organised into categories.

They offered:
UNLIMITED Hosting Space
UNLIMITED File Transfer
UNLIMITED Domains hosting
2,500 POP/Imap Email Accounts
SSH (Secure Shell), SSL, FTP, Stats
CGI, Ruby (RoR), Perl, PHP, MySQL
2000/2002 Front Page Extensions
One Free Domain Forever!
Free Site Builder

Not to mention, their excellent customer service and support.

All this was for 6.99$ per month. It was too cheap for what they had to offer. Its been 14 months since I purchased their hosting and I never had major problems. There was problem for about 10 days when their server went up and down all the time. I asked the support and they said that their was an upgrade being performed on my box. Since, then there hasn’t been any problem. Their 99% uptime guarantee stands out to be true.

If you wanna buy a shared hosting, this host is highly recommended. After all 0.9 million customers cannot be wrong!

This is an honest review from a satisfied customer, that is me.

If you wanna buy this hosting, please follow this link:
Buy your account here.

P.S: So far, I’ve learnt PHP, MySQL, Javascript, CSS, HTML (ofcourse) and I’ve been doing web development for various clients now. No more a newbie to web. xD