1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Best way to post scraped content remotely?

Discussion in 'Blogging' started by Pb.com, Mar 9, 2011.

  1. Pb.com

    Pb.com Registered Member

    Joined:
    Sep 10, 2010
    Messages:
    92
    Likes Received:
    11
    Occupation:
    SEO Consultant and Software Engineer
    Location:
    U.S.
    What is the best way to post scraped content remotely?

    For wordpress..



    I currently use a Plugin called Postie which allows me to send posts through emails but I hit my limits very quickly. I need to make 200+ sites each with roughly 400 posts. Any ideas?
     
  2. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    Enable XMLRPC for your blog

    PHP:
    <?php 

    wpPostXMLRPC
    ('post','title',"articlebody",'http://yourdomain.com/xmlrpc.php','wordpressuser','wordpresspass','categoryname',$search_keyword,$which_site);



    function 
    wpPostXMLRPC($post_type,$title,$body,$rpcurl,$username,$password,$category,$search_keyword,$which_site,$keywords='',$encoding='UTF-8') {
    if(
    trim($title)=='' || trim($body)==''){return;}

     
    $body=utf8_decode($body);$title=utf8_decode($title);
    $body preg_replace('/[^(\x20-\x7F)]*/',''$body);$body stripslashes$body);
    $title preg_replace('/[^(\x20-\x7F)]*/',''$title);$title stripslashes$title);


    $dateCreated date("Y-m-d H:i:s" strtotime("- 3 days"strtotime(date("Y-m-d H:i:s"))));

     
        
    $title htmlentities($title,ENT_NOQUOTES,$encoding);
        
    $keywords htmlentities($keywords,ENT_NOQUOTES,$encoding);
     

        
    $content = array(
            
    'title'=>$title,
            
    'description'=>$body,
            
    'mt_allow_comments'=>0,  // 1 to allow comments
            
    'mt_allow_pings'=>0,  // 1 to allow trackbacks
            
    'post_type'=>$post_type,
            
    'post_status'=>'publish',
            
    'wp_author_id'=>'credit',
            
    'mt_keywords'=>$keywords,
            
    'categories'=>array($category),
            
    'dateCreated' => $dateCreated 

             
    );
             
           
    $ch curl_init();  
        
        
    $params = array(0,$username,$password,$content,1);
        
    $request xmlrpc_encode_request('metaWeblog.newPost',$params);
        
    curl_setopt($chCURLOPT_POSTFIELDS$request);
        
    curl_setopt($chCURLOPT_URL$rpcurl);
        
    curl_setopt($chCURLOPT_RETURNTRANSFER1);
        
    curl_setopt($chCURLOPT_TIMEOUT30);
        
    $results curl_exec($ch);
        
    curl_close($ch);
     
      
    $response xmlrpc_decode(trim($results));
            
       if (
    $response && xmlrpc_is_fault($response)) {
       echo 
    "xmlrpc: $response[faultString] ($response[faultCode])";
        }else{
           echo 
    "The ARTICLE: ".$title." CREATED! keyword used for this article: ".$search_keyword."-".$which_site."-".$response."-";}
        
        
    }
    ?>
     
  3. udaybiz

    udaybiz Newbie

    Joined:
    Oct 5, 2008
    Messages:
    17
    Likes Received:
    4
    i think email to blogger and blogger to ur wordpress blog using rss feed plugin will work.
     
  4. dummydecoy

    dummydecoy Junior Member

    Joined:
    Jul 4, 2010
    Messages:
    154
    Likes Received:
    39
    XML import !