Hi all
I am getting this error: Parse error: syntax error, unexpected ‘;’, expecting ‘)’ on line 14
I originally got this error:
An error occurred - -32700:parse error. not well formed
so I changed the code to an array but php is not my strong point and I get the error. Why am I getting this error? Thanks
<?php
include("./wp-includes/class-IXR.php");
$client = new IXR_Client('http://mysite.com/xmlrpc.php');
if (!$client->query('wp.getCategories','password', 'username',’password’)) {
die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage());
}
$response = $client->getResponse();
$content = array(
'title'=>$title;
'description'=>$article;
'mt_allow_comments'=>$allowcomments;
'mt_allow_pings'=>$allowtrackbacks;
'post_type'=>'post';
'mt_keywords'=>$keywords;
'categories'=>array($categories;
if (!$client->query('metaWeblog.newPost','password', 'username',’password’, $content, false)) {
die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage());
}
echo $client->getResponse(); //with Wordpress, will report the ID of the new post
?>