raimis100 Posted August 8, 2008 Share Posted August 8, 2008 Hey I want to manually send pingbacks from my wordpress blog but I can;t figure out how to use this script. Help needed here Code: function doPingback( $url , $blogu, $post ) { require_once ('wp-includes/class-IXR.php'); $bu = "" . $blogu; $client = new IXR_Client( $url ); if(!$client->query( 'pingback.ping', $post->guid, $bu )) { //48 means the trackback/pingback has already been registered if($client->getErrorCode() != '48') { //var_dump('Error on ' . $url . ': pingback.ping('. $post->guid .', '. $bu . ')'); return false; } } //file_put_contents(ABSPATH . '/wp-content/plugins/responses.xml', "\n\n -- \n" . $blogu .': '. var_dump($client->getResponse())); return $client->getResponse(); } Link to comment https://forums.phpfreaks.com/topic/118842-wordpress-pingbacks/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.