Contact Us
Hire PHP Web Developer
require_once('IXR_Library.inc.php'); // Download
$blog_id = "2"; // only blogid no need to set username/password for blog
$admin_user = "username here"; // Login username => that you use at http://www.yourdomain.com/cgi-bin/mt.cgi
$admin_pass = "password here"; // Web Services Password => will be found at http://www.yourdomain.com/cgi-bin/mt.cgi?__mode=view&_type=author&id=XX
$xmlrpc_host = "http://www.yourdomain.com/cgi-bin/mt-xmlrpc.cgi"; // or http://www.yourdomain.com/cgi-bin/mt/mt-xmlrpc.cgi
$client = new IXR_Client($blog_url);
if (!$client->query('metaWeblog.getCategories',$blog_id, $admin_user,$admin_pass)) {
die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage());
}
$content['title'] = "Free PHP Script";
$content['categories'] = array($response[0]['categoryName']);
$content['description'] = '<p> <b> Free PHP Script !!! </b> <br> Author : Vasim Padhiyar <br> Contact : iamvasim@gmail.com <br> Blog : http://scriptforphp.blogspot.com </p>';
if (!$client->query('metaWeblog.newPost',$blog_id, $admin_user,$admin_pass, $content, true)) {
die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage());
}
else
{
$response = $client->getResponse();
}
$post_id = $response['postid'];
$post_url = $response['link'];
$category = $response['categories'][0];

0 comments:
Post a Comment