Custom field to taxonomy

$brand_name = get_post_meta($post->ID, 'Brand Name', true);

//Brand Meta
$object_term = wp_get_object_terms($post->ID, 'brand');
$object = $object_term[0];
$current_brand = $object->name;

if($current_brand =='' && $brand_name !=''){
wp_set_object_terms($post->ID,$brand_name,'brand');
} else /*Do Nothing*/;

Taxonomy Hook

add_action( wp_insert_post, 'set_brand');

function set_brand($postid){
$brand_name = get_post_meta($postid, 'Brand Name', true);
wp_set_object_terms($postid,$brand_name,'brand');
}

Access stdClass Object

//Get the terms for your post in the "brand" taxonomy
$the_terms = wp_get_object_terms( $post->ID, 'brand' );

$object = $the_terms[0];
$taxonomy_name = $object->taxonomy;

Convert IP to IP Number

$user_ip = explode(".", $_SERVER['REMOTE_ADDR']);

$w=$user_ip[0];
$x=$user_ip[1];
$y=$user_ip[2];
$z=$user_ip[3];

$ipnum = 16777216*$w + 65536*$x + 256*$y + $z;

//Beter Solution is to use the 'inet_aton' function in MySql
$the_ip = $_SERVER['REMOTE_ADDR'];
$country_query = "SELECT country_code2,country_name FROM webstats ".
"WHERE IP_FROM<=inet_aton('$the_ip') ".
"AND IP_TO>=inet_aton('$the_ip') ";

301 Redirects

http://www.squidoo.com/301

redirect 301 /about-medical-staffing-agencies http://www.legalmedicalstaffing.com/about-staffing-agencies

redirect 301 /job-seekers-medical-staffing http://www.legalmedicalstaffing.com/job-seekers-medical-staffing

redirect 301 /employers-legal-medical-staffing http://www.legalmedicalstaffing.com/employers-legal-medical-staffing

redirect 301 /affiliate-recruitment http://www.legalmedicalstaffing.com/affiliate-recruitment

redirect 301 /contact-us http://www.legalmedicalstaffing.com/contact-us

redirect 301 /find-us http://www.legalmedicalstaffing.com/find-us

redirect 301 /category/blog http://www.legalmedicalstaffing.com/category/blog

redirect 301 /site-map http://www.legalmedicalstaffing.com/site-map

redirect 301 /tips-tools-and-help http://www.legalmedicalstaffing.com/tips-tools-and-help

redirect 301 /post-resume http://www.legalmedicalstaffing.com/post-resume

redirect 301 /post-job-opening http://www.legalmedicalstaffing.com/post-job-opening

redirect 301 /faq http://www.legalmedicalstaffing.com/faq

redirect 301 /top-ten-resumes http://www.legalmedicalstaffing.com/top-ten-resumes

RewriteEngine on
RewriteRule (.*) http://www.legalmedicalstaffing.com/$1 [R=301,L]

As2 Countdown Timer

addEventListener ('enterFrame',callback_handler);

this.onEnterFrame = function (){

var today: Date = new Date();
var currentYear = today.getFullYear();
var currentTime = today.getTime();

var targetDate:Date = new Date(currentYear,6,28);
var targetTime = targetDate.getTime();

var timeLeft = targetTime - currentTime;

var sec = Math.floor(timeLeft/1000);
var min = Math.floor(sec/60);
var hrs = Math.floor(min/60);
var days = Math.floor(hrs/24);
sec = string(sec % 60);
if (sec.length < 2) {
sec = "0" + sec;
}
min = string(min % 60);
if (min.lenth <10) {
min = "0" + min;
}
hrs = string(min % 60);
if (hrs.lenth <10) {
hrs = "0" + hrs;
}
days = string(days);

var counter : String = days + ":" + hrs + ":" + min + ":" + sec;
time_txt.text = counter;
}