First, check the browser or user agent using $_SERVER['HTTP_USER_AGENT'] for some of the strings listed here: http://www.useragentstring.com/pages/All/ Or more specifically for crawlers: http://www.useragentstring.com/pages/Crawlerlist/ If you want to say log the number of visits of most common search engine crawlers, you could use: $interestingCrawlers = array( 'google', 'yahoo' ); $pattern = '/(' . implode('|', $interestingCrawlers) .')/'; $matches = array(); $numMatches = [...]

Categories: PHP

I can use the functions of wordpress wpdb in standalone scripts. This is just a simple way. By simply inserting the following code at the beginning of the script: <?php $path = $_SERVER['DOCUMENT_ROOT']; include_once $path . '/wp-config.php'; include_once $path . '/wp-load.php'; include_once $path . '/wp-includes/wp-db.php'; //include_once $path . '/wp-includes/pluggable.php'; // alternate to use installed plugins // $wpdb is available, do [...]

Categories: WordPress

Have you ever had the problem experience when using XAMPP whereas your installation was running smoothly. But when you run XAMPP Control Panel and start Apache web server, it said: Possible problem detected: Port 80 in use by “system”! Open the “Services.msc” application. Click Windows Logo, then go to run box (on Win 9x and Win XP) or go to [...]

Categories: Server/Security

Here is a simple way to install ioncube on XAMPP (web server at localhost). First, download ioncube loader from http://www.ioncube.com/loaders.php Then extract to the root htdocs, usually on C:\xampp\htdocs and the root folder of ioncube loader is on C:\xampp\htdocs\ioncube Find and edit php.ini file, usually at C:\xampp\php\php.ini After downloading ioncube loader, then extract to the root htdocs of your XAMPP, [...]

Categories: PHP, Server/Security

Categories: Shouts

You know guys? This is easy way to have WordPress on webhosting. Watch this video and you can creates WordPress Blog in a minute. Easy WordPress Installation with iPage This video’s powered by:

Categories: Shouts

To removes (trim) all white space around image (example on JPG), you can use this short code. How it’s work? It just a simple way. This script will find out where is the “WhiteSpace” stops, then it will copy everything inside the white space border. <?php //load the image! it's possible to open remote image from another website, just put [...]

Categories: Function, PHP

Here is small code to make your WordPress Search Result more friendly for SEO (Search Engine Optimization). It will result http://www.shouthuns.com/search/find-something/ instead http://www.shouthuns.com/?s=find+something Just put this code into top of the header of your themes. (Remember! It should be placed on first line on your header themes) <?php $src = strtolower(mysql_real_escape_string($_GET['s'])); $sclear = ereg_replace("[^ 0-9a-zA-Z]", " ", $src); // Remove [...]

Categories: PHP, SEO, WordPress