PHP to WordPress and other support XMLRPC website offline post Code _php tutorial

Source: Internet
Author: User
Last week made a silver Soul website
Http://www.iyinhun.com
Fans of the hot-blooded animation who like to spit groove can see.

Because a person to do, more difficult, I would like to do an automatic maintenance program (actually is the meaning of the collector)
The following is the code for PHP to send articles to such websites (PHP to Wordpress,blogbus,cnblogs and other support XMLRPC website offline posting code)
The classification attribute (categories,mt_keywords) changes itself.
The attachment is the class library of the WordPress XMLRPC protocol.

function Send_to_other ($web, $title, $con, $USER, $PASS, $count =-1)  {$client = new ixr_client ($web);        $content [' title '] = $title;        $get _post_info->post_category;        $content [' categories '] = Array ("fan");        $content [' description '] = $con;       $content [' custom_fields '] = Array (' key ' = ' my_custom_fied ', ' value ' = ' yes ');        $content [' mt_keywords '] = ' companions ';      if (! $client->query (' metaweblog.newpost ', ' ", $USER, $PASS, $content, True))         {die            (' Error while creating a New Post '. $client->geterrorcode (). ":". $client->geterrormessage ());          }        $ID =  $client->getresponse ();                if ($ID)        {           //echo ' Post published with id:# '. $ID;        }       return $post _id;  }  

http://www.bkjia.com/PHPjc/444555.html www.bkjia.com true http://www.bkjia.com/PHPjc/444555.html techarticle last week made a silver Soul website http://www.iyinhun.com likes to spit groove of the warm-blooded animation fans can see. Because a person to do, more difficult, I would like to do an automatic maintenance program (in fact ... )

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.