Oh #%@&, something's wrong...
Sorry, but echo $_SERVER['REQUEST_URI']; ?> doesn't exist on the Urban Mainframe at this time. If it once existed here then it may have been moved, renamed or deleted.
if ($_SERVER['HTTP_REFERER']) {
echo "
The link at " . $_SERVER['HTTP_REFERER'] . " is incorrect.
";
}
?>
What Now?
If you typed the address (URL), be sure to check your spelling!
You could visit the home page? Or browse the archives? Or you can see if fate brought you to my website for another reason…
$keyword = substr($_SERVER['REQUEST_URI'],1);
$keyword = urldecode(stripslashes($keyword));
$keyword = str_replace('/',' ',$keyword);
$ref = $_SERVER['HTTP_REFERER'];
if( preg_match("#(google|msn|live|altavista|alltheweb|scirus)#si", $ref)){
$s=explode("?",$ref);
parse_str($s[1]);
$keyword = $q;
}elseif(preg_match("#(aol|vivisimo|lycos|aliweb)#si", $ref) ){
$s=explode("?",$ref);
parse_str($s[1]);
$keyword = $query;
}elseif(strstr( $ref,'yahoo')){
$s=explode("?",$ref);
parse_str($s[1]);
$keyword = $p;
}elseif(strstr( $ref,'baidu')){
$s=explode("?",$ref);
parse_str($s[1]);
$keyword = $wd;
}
$limit=10;
$len=25;
$before_title = '';
$after_title = '';
$before_post = '';
$after_post = '';
$show_pass_post = false;
$show_excerpt = false;
global $wpdb, $post;
// Make sure the post is not from the future
$time_difference = get_settings('gmt_offset');
$now = gmdate("Y-m-d H:i:s",(time()+($time_difference*3600)));
// Primary SQL query
$sql = "SELECT ID, post_title, post_content,"
. "MATCH (post_name, post_content) "
. "AGAINST ('".mysql_escape_string($keyword)."') AS score "
. "FROM $wpdb->posts WHERE "
. "MATCH (post_name, post_content) "
. "AGAINST ('".mysql_escape_string($keyword)."') "
. "AND post_date <= '$now' "
. "AND (post_status IN ( 'publish', 'static' ) && ID != '$post->ID') ";
if ($show_pass_post=='false') { $sql .= "AND post_password ='' "; }
$sql .= "ORDER BY score DESC LIMIT $limit";
$results = $wpdb->get_results($sql);
$output = '';
if ($results) {
foreach ($results as $result) {
$title = stripslashes($result->post_title);
$permalink = get_permalink($result->ID);
$post_content = strip_tags($result->post_content);
$post_content = stripslashes($post_content);
$output .= $before_title .'' . $title . '' . $after_title;
if ($show_excerpt=='true') {
$words=split(" ",$post_content);
$post_strip = join(" ", array_slice($words,0,$len));
$output .= $before_post . $post_strip . $after_post;
}
}
echo "Possible Match(es)
";
echo "";
echo $output;
echo "
";
}
?>
Recent Posts
If all else fails contact me and I'll do the best I can to help.
NOTICE: The old Urban Mainframe is no more. I started from scratch. Perhaps the page you are looking for was lost during the transition?