Best way to post scraped content remotely?

Pb.com

Registered Member
Joined
Sep 10, 2010
Messages
94
Reaction score
13
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?
 
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($ch, CURLOPT_POSTFIELDS, $request);
    curl_setopt($ch, CURLOPT_URL, $rpcurl);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    $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."-";}
    
    
}
?>
 
i think email to blogger and blogger to ur wordpress blog using rss feed plugin will work.
 
Back
Top