Kavoir & Whatever Make Money Online and Status Report is actually an old domain, I registered it over a year ago and parked it ever since with a custom page of my own. It has been indexed in Google for 1 year. So what you are seeing now may very probably not happen for you if you just registered a fresh domain name. Don’t get your hopes too high for newly registered domains. You need to wait and be patient unless you have large amount of Internet marketing resources such as an established network of reputable sites that can link back to the new site.

So it’s not until recently that I switched Military Fiction Books to WordPress and started importing content into it by, well, virtually copying the texts and images from Amazon.

I know, but before you start judging me, let me tell you this. I may be too lazy to come up with something of my own for the sake of SEO because it’s time consuming. When you commit yourself in the chores, you are a worker, not an entrepreneur any more. You will be rewarded as a worker, instead of an online entrepreneur. It’s as simple as that.

That said, my recommendation is that either you hire someone who’s good at writing write the articles for you or you will find a way to automate the process in a time-effective manner. The results may not be as good as you want but it will surely save you a lot of time which is much more precious than some search engine rankings. You will do a lot more than you normally would if you follow this methodology.

Okay the site status part by promise in this post. For the last 17 days of August, has been receiving traffic from various search engines (mainly Google, of course) by terms such as “military fiction books”, “military novels”, etc. The rough traffic statistics are listed below:

military fiction books site traffic stats

It’s been doing quite well and still gaining since I switched to WordPress and wrote all these posts about military fiction novels on Amazon. I posted 2 – 3 posts every 2 days for the last week or so. Built a few links from various forums (webmasters, book clubs, etc.) and on Kavoir itself in the last 2 weeks and it seems they are working. This site has clearly passed the sandbox phase because every new post brings significant traffic from Google and it’s on the steady rise. This is a typical sign of mature SEO for a site. Your page is pretty quickly indexed by Google AND it’s ranked well. But it also depends on the frequency and intervals you post. on the other hand, is a freshly registered domain, less than a month old. But it’s already performing in SEO traffic though not much. What I did was building a few links from a few forum posts (some original and some duplicate) and Kavoir itself. I wrote all the product posts in the same day a week ago and never updated it since:

standing desk site traffic stats

But I’m sure it will steadily grow if I keep posting content to the blog. A sandbox effect is waiting for Maybe in 1 or 2 weeks.

Affiliate Programs

Amazon Associate (Affiliate) Program Review: Why I love them

Go to

There are tens of thousands of different affiliate programs out there you can use to monetize your traffic. A few of the biggest players are ClickBank, eBay, Amazon, CJ and Google Affiliate Network. Unlike CJ and Google Affiliate Network who are simply brokers of merchants and affiliates, Amazon and eBay are independent merchants. I tried CJ with no luck at all – when I say at all, I mean it. Maybe it’s because I’m not an AdWords type of marketer. Never tried Google Affiliate Network though, but we’ll soon find out how that goes. I’ll keep you updated on what I’m doing. ClickBank has too many information products that require strong marketing skills or generous AdWords spending to get ahead. eBay doesn’t let me sign up in the first place because of my location.

I’m currently averaging around $100 bucks per month (Update: as of Mar. 2011, I’m making about $400 / month. ) via the Amazon Associate Program. It’s not much but believe it or not, I’m really enjoying it. It’s terrific products they have there and the money is easy because what I did was just a few posts on that recommends good development books to my readers. They end up buying more than what I recommended, 70% of the time I’ll say. Although they started on books, Amazon is such a huge independent merchant with such a massive inventory of almost everything you can name that you need in the daily life. So they are a rather easy start for novice affiliate marketers. All right, here goes my review of the Amazon affiliate program.

What are great?

  1. amazon associate program earning statsAmazon is a globally recognized brand. And because of this, the conversion rate is pretty high when you are sending traffic to them. Chances are the visitors you refer to Amazon used to shop there or at least heard of / known them for some time. Take my earning stats of the first 10 days of August for example, over the 622 clicks I sent to them, I have an overall conversion rate of 4.66% – that’s not bad for casual, non-targeted traffic (as opposed to traffic gathered from AdWords). Roughly speaking, 1 sale was made in every 21 people who visited Amazon via my link.
  2. People are already familiar with the products at Amazon because they are all recognized brands. It just makes the sales even easier to make. People follow and trust brands. It takes tremendous time and commitment to build a brand, but once you establish it in the market, your products and services will sell themselves. With other affiliate networks, the hard part is the pre-sale. With Amazon, you don’t even have to do that at all. The only thing you need to do is to send them to the product pages at Amazon. They are already optimized to attract the maximum sales possible.
  3. Amazon has such a diversity and abundance of products you can sell. It has a huge selection of almost everything you can think of that you may want to sell online. It covers almost all the niches that you ever have the time to build. No matter what you are interested in and the topic of your website, you are certainly to find something at Amazon that fits into it. In fact, Amazon itself has inspired me to build more niche websites in the months to come. For a start, yesterday I launched Standing Desks and Military Fiction Books. Will keep you posted on how they are doing and how I’m doing them.
  4. Many people I refer to Amazon end up purchasing much more than what I recommended. They may not buy the things on the landing page (the referral link you give them to arrive at Amazon), but the Amazon Associate Program will always credit you for anything else they purchase, even on partner sites. As long as they make the purchase(s) within 24 hours of clicking your referral link, they are are going into your affiliate credits.
  5. Amazon has a rather sophisticated and usable associate / affiliate platform. I don’t need to even start counting the number of ways you can put Amazon affiliate links up on your site: product links, banners, pages (any page on Amazon can be linked and attributed to you) and widgets (product search, Carousel, deals, mp3 clips, favorites, slideshows, auto part finders, blog updates, product cloud, wish list, Omakase and so forth) in a variety of different forms. You can also create an aStore to exhibit and sell a selected set of products to a targeted group. However, the best stuff in their arsenal is the Product Advertising API by which you can have a niche site up in minutes. You can do mass queries to get any kind of information regarding a specific product or a group of similar ones, the title, price, manufacturer, brand, publisher, description, features, availability, customer reviews, you name it. I’m going to create a script to do just that, or perhaps a WordPress plug-in to do the dirty work for you.
  6. Amazon products are rarely returned and customer payments rarely refunded. In all the sales I made until now since I started the associate membership, over 400 of them in total, only 1 return happened. It goes without saying that this is a very good sign that you will be guaranteed of the reward for your referral efforts. You certainly don’t want to recommend products that are frequently returned to your visitors and readers.
  7. Amazon Associates is absolutely the best program for beginning Internet marketers. They are easy to use and easy to get started. Sign up, visit any page on and you can build a referral link in 10 seconds. Post the link on your website or blog and write a genuine review. You don’t have to spend an arm and a leg to get your first sale. Stuff on it are needed by many people and you have ocean-broad options. Best of all, for reasons I put forth above, they are really easy to sell, especially the books. For example, you can quickly start a books website with millions of pages by these books ISBN databases and link to Amazon sales page in this manner. These sites are not pretty but believe me, they are pulling adorable figures of monthly income via Amazon affiliate sales and Google AdSense.
  8. 5 times higher eCPM than AdSense. I can’t disclose any eCPM information of my AdSense performance as per the TOS, but I’m having 5 – 10 times the average eCPM with Amazon products (mostly books) than with Google AdSense. I’m not saying AdSense is inferior to Amazon associate program in this regard but you have to do it right. AdSense is a perfect money maker on large traffic that is not quite optimized and targeted, but on products sites, Amazon program rocks way better!

What are not so great?

  1. The commission rate is pretty much the lowest across the industry. They have a performance structure of variable commission rates (they call it advertising fee rates) that as the number of items you sold increase, the commission rate increases. Starting at 4.00%, the highest possible rate you can achieve is 8.50%. Some affiliate program such as those from ClickBank offers 75% or more commission rates.
  2. The cookie lifespan sucks too. It’s just 24 hours. What this means is that if the person you refer to Amazon doesn’t purchase anything within 24 hours of clicking through you referral link, you earn nothing and the referral is history. You get nothing neither even if he orders something after the 24 hours period. Other affiliate network / merchants typically have a much longer cookie period such as 60 days.
  3. Pain for foreign marketers. Amazon provides direct deposit to American residential marketers who receive their earnings almost instantly, but for foreign residents who live outside of US, check becomes the only venue to get the money. And it usually takes more than a month to arrive. It sucks. Sometimes it can really kill the motivation of foreign associates, me included. I guess they just don’t quite care about this. I would be very much glad to see them offer wire transfer as an additional approach to send the affiliate rewards.

So what do you say? I’m certainly going to create more Amazon niche websites soon! Subscribe to this blog to read more tips on making money online with the Amazon Associate Program. I’ll keep you updated on how I’m doing.

Coupons and Promo Codes Domains

Godaddy $7.69 .org domain registration coupon promo code

Update: Here’s the latest coupon code of Godaddy – $1.49 / year .com

God knows why they have raised the .org registration fee to $14.99. I don’t know if it’s temporary or just the way it will be for a long time to come but it’s outrageous. Fortunately I have found this .org domain registration coupon that got me the domain for just $7.69.


Almost 50% off. Not bad, so thought should share with you guys. Please comment if you have a better .org promo code for registering .org names at Godaddy. For web hosting, we recommend WiredTree. Use these WiredTree coupons to get extra or discounted packages.

PHP Tips & Tutorials

How to get all the sub-directories of a given directory in PHP?

When you read the content of any specified directory with PHP functions such as scandir() or readdir(), they will return both files and directories. How does one get just the child directories of a given directory in PHP? The obvious solution is the is_dir() function that checks if a filename is a directory:

$all = scandir('.'); // . stands for the current directory, you can use any path string here
$dirs = array();
foreach ($all as $each) {
	if (is_dir($each)) {
		$dirs[] = $each;

Which will return:

    [0] => .
    [1] => ..
    [2] => dir1
    [3] => dir2
    [4] => dir3

Clearly, the problem of this approach is that it also returns ‘.’ and ‘..’.

A better approach is the glob() function that searches the current directory by a certain pattern. You can use it in conjunction with the array_filter() function to select all the directories:

$dirs = array_filter(glob('*'), 'is_dir'); // is_dir function is used against each item of the array returned by glob('*')

Which will give out results:

    [0] => dir1
    [1] => dir2
    [2] => dir3

A neater way to get the same results with glob() function is this:

$dirs = glob('*', GLOB_ONLYDIR);

The GLOB_ONLYDIR flag commands the function to return only directory entries that match the pattern ‘*’.

PHP Tips & Tutorials

How to check if a MySQL database connection is successful in PHP?

If you have mysqli extension installed with PHP and you use it to perform database operations, after you have tried to connect to MySQL by:

$conn = new mysqli('localhost', 'db_user', 'db_pwd', 'db_name');

You can then check if the connection is successful by:

if ($conn -> connect_errno) {
  // failure
} else {
  // success

That’s because connect_errno contains the error number of the last query. If there’s no error, it’s 0 by default. If an error occurred in the last query, it’s a natural number greater than zero. There you go with the conditional check of whether the PHP database connection is successful.

However if you are using the legacy mysql extension to connect to MySQL databases:

$conn = mysql_connect('localhost', 'db_user', 'db_pwd');

It’s even simpler. The returned value of mysql_connect() function will be FALSE should the connection fail. Therefore, you can check if the connection is successful by:

if ($conn = mysql_connect('localhost', 'db_user', 'db_pwd')) {
  // success
} else {
  // failure
SQL / MySQL Tips and Tutorials

MySQL: Check if a table exists

When I was creating an installation script, I needed to check if a table exists to make sure the installation had not been performed yet. How did I do that?

I use this simple query to get whether a table exists in the specified database:

SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'db_name'
AND table_name = 'table_name'

Just fill in the ‘db_name’ as well as ‘table_name’. If this query returns 1 row, the table db_name.table_name does exist, otherwise it does not.

Kavoir & Whatever

My online income report – June, 2010

Edit: Forgot all the website advertising revenues other than AdSense. Added it.

So I thought I should start writing things that are more personal and interesting. I ended up with this crazy idea – posting about my online income. People always want to know how much people make online, and more importantly, how they have made the money online.

Listed below are my primary sources of income from last month, June, 2010.

  1. Google AdSense – $740.91
  2. Sales of my own products – $960.75
  3. Amazon Associate Program – $54.67
  4. Other affiliate / partner programs – $932.44
  5. Website advertising revenues other than AdSense (such as the buy sell ads on - Roughly $250

And the total amount of earnings I have made online from last month is about $2938. It’s not bad considering I spend like only 3 hours a day and 5 days a week working from home on my PC to get all this. The above earnings didn’t include my freelance projects which I used to rely on heavily for the primary source of income. I don’t quite like them because it’s not passive so I’m giving up on them. Unless it’s a very interesting project that I feel compelled to work on, I’d not do it for less than 5 figures.

If you would like to know how you can do this yourself, making 4 figures monthly, feel free to comment below and let me know. I will help as much as I can. Otherwise, what can you suggest as an interesting topic for

JavaScript Tips & Tutorials

How to include a JavaScript file inside a JavaScript file?

This is a pretty odd question to ask in the first place if you have been using JavaScript for a while. JavaScript files are called from HTML web pages who need them to manipulate the HTML elements so that the users have extraordinary interactive experience. You can’t include a JavaScript file inside another JavaScript file like you can with PHP files, but you can only include JS files from HTML files.

If you need something that’s in a JavaScript file such as a predefined function, just include the file before wherever you are using the function and it should be fine. For example, you are calling A.js from a HTML file:

<script type="text/javascript" src="A.js"></script>

There is a rather sophisticated function in B.js that A.js relies on. You are wondering how to include B.js in A.js so A.js works properly. No you can’t. The answer is not to include B.js in A.js but include B.js in the HTML file before it includes A.js.

<script type="text/javascript" src="B.js"></script>
<script type="text/javascript" src="A.js"></script>

Now all the code in A.js should work fine. This is because all HTML code are read, parsed and executed in basic sequence from top to bottom. It’s the same with JavaScript code. When you need something from another JavaScript file and want to use it on the web page, just include it in the HTML web page. You can’t include a JavaScript file in a JavaScript file.

JavaScript Tips & Tutorials

JavaScript: How to set focus to form elements?

Normally, when users click on any label tag with the cursor, the corresponding input field will be focused ready for input or selection. Therefore, you can always achieve the focus effect by this native function of HTML’s. Otherwise, you’d need a small dime of JavaScript to set focus to any form element on the fly upon a certain event:

// FormName is the name value of the form.
// FieldName is the name value of the field
// to be focused.

Or by element ID:

// FieldId is the id value of the field
// element to be focused.

There you go, the tiny focus() function is what we all need.

JavaScript Tips & Tutorials

JavaScript: How to get the URL of the current web page?

To get the URL address of the current page with JavaScript, simply return the value of window.location.href:


Which is the same with:


There’s much more you can do with the JavaScript Location Object such as redirecting to another URL.