weblogUpdates.ping '.$blogname.' '.$blogurl.' '; $target=parse_url($url); $tb_sock = fsockopen($target["host"], 80); fputs($tb_sock, "POST " . $target["path"] . $target["query"] . " HTTP/1.1\r\n"); fputs($tb_sock, "User-Agent: Nudnik.ru\r\n"); fputs($tb_sock, "Host: " . $target["host"] . "\r\n"); fputs($tb_sock, "Content-Type: text/xml\r\n"); fputs($tb_sock, "Content-length: " . strlen($tb_send) . "\r\n"); fputs($tb_sock, "Connection: close\r\n\r\n"); fputs($tb_sock, $tb_send); // Gather result while (!feof($tb_sock)) { $response .= fgets($tb_sock, 128); } // Close socket fclose($tb_sock); // Did the trackback ping work strpos($response, '0') ? $return = true : $return = false; // send result return $return; } ?>