ifelse – I just updated my profile to include my website. I also checked the issue with the bug. Thanks, but my code seems to be fine:
// Send a Trackback
function trackback($trackback_url, $title, $excerpt, $ID) {
global $wpdb;
$title = urlencode($title);
$excerpt = urlencode($excerpt);
$blog_name = urlencode(get_settings('blogname'));
$tb_url = $trackback_url;
$url = urlencode(get_permalink($ID));
$query_string = "title=$title&url=$url&blog_name=$blog_name&excerpt=$excerpt";
$trackback_url = parse_url($trackback_url);
$http_request = 'POST ' . $trackback_url['path'] . ($trackback_url['query'] ? '?'.$trackback_url['query'] : '') . " HTTP/1.0rn";
$http_request .= 'Host: '.$trackback_url['host']."rn";
$http_request .= 'Content-Type: application/x-www-form-urlencoded; charset='.get_settings('blog_charset')."rn";
$http_request .= 'Content-Length: '.strlen($query_string)."rn";
$http_request .= "User-Agent: WordPress/" . get_settings('version');
$http_request .= "rnrn";
$http_request .= $query_string;
if ( '' == $trackback_url['port'] )
$trackback_url['port'] = 80;
$fs = @fsockopen($trackback_url['host'], $trackback_url['port'], $errno, $errstr, 4);
@fputs($fs, $http_request);
/*
$debug_file = 'trackback.log';
$fp = fopen($debug_file, 'a');
fwrite($fp, "n*****nRequest:nn$http_requestnnResponse:nn");
while(!@feof($fs)) {
fwrite($fp, @fgets($fs, 4096));
}
fwrite($fp, "nn");
fclose($fp);
*/
@fclose($fs);
$wpdb->query("UPDATE $wpdb->posts SET pinged = CONCAT(pinged, 'n', '$tb_url') WHERE ID = '$ID'");
$wpdb->query("UPDATE $wpdb->posts SET to_ping = REPLACE(to_ping, '$tb_url', '') WHERE ID = '$ID'");
return $result;
}
ceo – I know that my trackbacks and pinging technorati is not working. I’ve been checking sites that I have used the trackback feature for, and have gotten nothing. In fact, I can’t say that it has ever worked properly.