Jump to content

Wordpress & pingbacks


raimis100

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.