diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php
index 531dd50..079e8fb 100644
--- a/src/wp-includes/class-wp-xmlrpc-server.php
+++ b/src/wp-includes/class-wp-xmlrpc-server.php
@@ -6231,53 +6231,19 @@ class wp_xmlrpc_server extends IXR_Server {
 		if ( !$pos1 )
 			return $this->pingback_error( 0, __( 'Is there no link to us?' ) );
 
-		// let's find which post is linked to
-		// FIXME: does url_to_postid() cover all these cases already?
-		//        if so, then let's use it and drop the old code.
-		$urltest = parse_url($pagelinkedto);
-		if ( $post_ID = url_to_postid($pagelinkedto) ) {
-			// $way
-		} elseif ( isset( $urltest['path'] ) && preg_match('#p/[0-9]{1,}#', $urltest['path'], $match) ) {
-			// the path defines the post_ID (archives/p/XXXX)
-			$blah = explode('/', $match[0]);
-			$post_ID = (int) $blah[1];
-		} elseif ( isset( $urltest['query'] ) && preg_match('#p=[0-9]{1,}#', $urltest['query'], $match) ) {
-			// the querystring defines the post_ID (?p=XXXX)
-			$blah = explode('=', $match[0]);
-			$post_ID = (int) $blah[1];
-		} elseif ( isset($urltest['fragment']) ) {
-			// an #anchor is there, it's either...
-			if ( intval($urltest['fragment']) ) {
-				// ...an integer #XXXX (simplest case)
-				$post_ID = (int) $urltest['fragment'];
-			} elseif ( preg_match('/post-[0-9]+/',$urltest['fragment']) ) {
-				// ...a post id in the form 'post-###'
-				$post_ID = preg_replace('/[^0-9]+/', '', $urltest['fragment']);
-			} elseif ( is_string($urltest['fragment']) ) {
-				// ...or a string #title, a little more complicated
-				$title = preg_replace('/[^a-z0-9]/i', '.', $urltest['fragment']);
-				$sql = $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_title RLIKE %s", $title );
-				if (! ($post_ID = $wpdb->get_var($sql)) ) {
-					// returning unknown error '0' is better than die()ing
-			  		return $this->pingback_error( 0, '' );
-				}
-			}
-		} else {
-			// TODO: Attempt to extract a post ID from the given URL
-	  		return $this->pingback_error( 33, __('The specified target URL cannot be used as a target. It either doesn&#8217;t exist, or it is not a pingback-enabled resource.' ) );
-		}
+		$post_ID = url_to_postid( $pagelinkedto );
 		$post_ID = (int) $post_ID;
+                $post = get_post($post_ID);
 
-		$post = get_post($post_ID);
 
-		if ( !$post ) // Post_ID not found
-	  		return $this->pingback_error( 33, __( 'The specified target URL cannot be used as a target. It either doesn&#8217;t exist, or it is not a pingback-enabled resource.' ) );
+                if ( ! $post )
+                        return $this->pingback_error( 33, __( 'The specified target URL cannot be used as a target. It either doesn&#8217;t exist, or it is not a pingback-enabled resource.' ) );
 
-		if ( $post_ID == url_to_postid($pagelinkedfrom) )
-			return $this->pingback_error( 0, __( 'The source URL and the target URL cannot both point to the same resource.' ) );
+		if ( $post_ID == url_to_postid( $pagelinkedfrom ) )
+			return $this->pingback_error( 0, __( 'The source URL and the target URL cannot both point to the same resource.' ) );		
 
 		// Check if pings are on
-		if ( !pings_open($post) )
+		if ( ! pings_open( $post ) )
 	  		return $this->pingback_error( 33, __( 'The specified target URL cannot be used as a target. It either doesn&#8217;t exist, or it is not a pingback-enabled resource.' ) );
 
 		// Let's check that the remote site didn't already pingback this entry
