Author name: Yang Yang

Hello, I'm Yang. I build online businesses that please people. Want to join in and post some useful articles on Kavoir.com? Shoot me a message.

PHP: Display Current Year to Automatically Update Copyright Years

I guess most of the websites out there are using plain strings for the years of footer copyright because many of them are still showing 2009 right now. If you have quite a few websites as I do, it’d be kind of intimidating to manually update the copyright years for all of them. So why …

PHP: Display Current Year to Automatically Update Copyright Years Read More »

Use stat command to display file system meta information of any file or directory under Linux

PHP has a stat() function that returns an array containing the meta information of a file such as owner, size, time of last access, last modification or last change. It’s basically the stat command under Linux that returns and shows the file system meta information of any file or directory: stat myfile.txt Which returns: File: …

Use stat command to display file system meta information of any file or directory under Linux Read More »

How to slow down the frequency Googlebot (search engine crawler) visits your site?

Googlebot is the indexing program of Google that visits your site to fetch the content to determine your search engine rankings. With a popular website, tens of thousands of pages can be a problem in that Googlebot may visit more than you want because it’s expending your precious bandwidth and even crashing your server. Every …

How to slow down the frequency Googlebot (search engine crawler) visits your site? Read More »

PHP: Allow Specific HTML Tags in Text Input Controls of HTML Forms, <textarea>, <input type=”text” />

Textarea and text input are common html form controls that accept text input. They can be a security challenge as they allow the user to enter anything they want. If you just go about using whatever data the user has entered, your application is anything but secure. Some sort of filtering / white-listing must be …

PHP: Allow Specific HTML Tags in Text Input Controls of HTML Forms, <textarea>, <input type=”text” /> Read More »

A few database security tips – things to do to effectively protect MySQL databases

I’d like to share with you some tips about hardening the database part of your application. Here are a few things you can do in protecting the databases from being compromised in security: Create separate users with ONLY necessary privileges (as few as possible) to connect to the database for common daily tasks. Never use …

A few database security tips – things to do to effectively protect MySQL databases Read More »

PHP: Why you should use dirname(__FILE__).‘/include.php’ instead of just ‘include.php’

When you need to include or require a php file that is in the same directory as the currently running one, most people come up with this simple line in the current script: include(‘include.php’); While this approach doesn’t present obvious breaches, it is slightly inefficient than the following way: include(dirname(__FILE__).’/include.php’); You will type a little …

PHP: Why you should use dirname(__FILE__).‘/include.php’ instead of just ‘include.php’ Read More »

2 reasons you should host all static content on a different domain

That is, to host all static content such as ready-made images, scripts, style sheets on a different domain rather than the primary one that hosts the page of the current URL. For example, if you intend to add static images to the web page located at http://www.example.com/page.html, you should not place the images on www.example.com, …

2 reasons you should host all static content on a different domain Read More »

How to install the Go programming language on your server or VPS?

Assuming you’ve logged in as root in Debian 5.0, to install the Go programming language by Google, Add these environmental variables for Go in .bash_profile: export GOROOT=$HOME/go export GOARCH=386 # for 32 bit architectures. Use GOARCH=amd64 for 64 bit architectures export GOOS=linux export GOBIN=$HOME/bin PATH=$PATH:$GOBIN Install the Mercurial ‘hg’ command: aptitude install mercurial Fetch the …

How to install the Go programming language on your server or VPS? Read More »

PHP: Subject String Length Limit of Regular Expression Matching Functions

Here’s a quick tip for those who have encountered this very same problem that all regular expression functions of PHP such as preg_match() and preg_replace() stop working when the input string (subject string to be searched or matched) is too long or large. If you believe your regular expressions should work but didn’t and the …

PHP: Subject String Length Limit of Regular Expression Matching Functions Read More »

How to change CJ password? (of Commission Junction)

This question has been asked a thousand times on the web and Commission Junction has apparently decided to make it harder for the affiliate publishers to find out how to change the password of their account. To change your CJ account password, Log into the account area or control panel, Click “Account” of the top …

How to change CJ password? (of Commission Junction) Read More »

How to recover lost Firefox bookmarks? Where is my Firefox bookmarks folder?

IE records all bookmarks or favorite web shortcuts in a folder named Favorites, but where does Firefox store all the bookmarks? Below are a list of very probable locations where Firefox would save your bookmarks by the OS you are using. Windows 95 (without Desktop Update) C:/Windows/Mozilla Windows 95 (with Desktop Update)/98/Me C:/Windows/Application Data/Mozilla C:/Windows/Profiles/<Windows …

How to recover lost Firefox bookmarks? Where is my Firefox bookmarks folder? Read More »

Firefox 2 Download: The Latest Version of Firefox 2 – Because Firefox 3 Sucks Big Time!

Bloated! Simply bloated to a point that’s not geeky any more. We need to revert to Firefox 2 and this is the download link of Firefox 2 setup executable file, the latest version Firefox 2.0.0.20, for Windows. http://releases.mozilla.org/pub/mozilla.org/firefox/releases/2.0.0.20/win32/en-US/Firefox%20Setup%202.0.0.20.exe Otherwise, you can view a list of historical releases of Firefox from the Mozilla team. Not convinced? …

Firefox 2 Download: The Latest Version of Firefox 2 – Because Firefox 3 Sucks Big Time! Read More »

If you are not a professional designer and don’t want to look stupid

I have a few tips for you: Stick to simple white design. Use no more than 4 colors other than grey scale (white, black, grey). Actually 2 would be perfectly enough for text information intensive sites. Design the site as if it’s a chapter in a print book. Plan blank areas. Be goal oriented and …

If you are not a professional designer and don’t want to look stupid Read More »

Create and moderate your own hosted vBulletin forums, free!

Jointly Hosted Forum is now open for forum applications. Please follow the steps outlined in this post to get your own forums. You will own a section of forums dedicated to topics of your choice (must be family-friendly) and be a moderator of the forums and users. The service is completely free for all, though …

Create and moderate your own hosted vBulletin forums, free! Read More »

Introducing Kavoir Backyard

Update: I finally decided to move the whole vbulletin installation over from jointlyhosted.com to kavoir.com. It’s called Kavoir Backyard. I created a sub-forums section at Jointly Hosted for Kavoir.com, feel free to register an account, it’s here: http://www.jointlyhosted.com/forum/forumdisplay.php?f=4 For now, almost all the boards are dedicated to technical topics (HTML, CSS, JavaScript, PHP, MySQL, etc.) …

Introducing Kavoir Backyard Read More »

Scroll to Top