How to Add Tags when posting via PHP
Hey, I’m trying to figure out how to add tags/keywords (these terms are interchangeable, right?) when posting to my blog via PHP. Here is the function I’m using to post right now. It’s working great, but I want to programmatically add tags. Many thanks:
$categories = implode(“,”, $categories);
$XML = “<title>$title</title>”.
$params = array(”,”,$username,$password,$XML,1);
$request = xmlrpc_encode_request(‘blogger.newPost’,$params);
$ch = curl_init();
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch, CURLOPT_URL, $rpcurl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 1);
wpPostXMLRPC(“May 14, 2011”,’‘,”http://thisiswhatwecareabout.com/xmlrpc.php”,admin,fakePassword);
The blog I need help with is amusesmile.wordpress.com.
Sorry it messed up the formatting on the function call. Here is a simplified version of what it actually looks like:
wpPostXMLRPC(“May 14, 2011″,allMyHTMLGoesHere,”http://thisiswhatwecareabout.com/xmlrpc.php”,admin,fakePassword);
http://thisiswhatwecareabout.com/ – the picture of the Huckster at the top of the post was very disturbing – however if you are asking about this site:
The site you are asking about does not seem to be hosted on WordPress.COM so you need to make friends over at WordPress.ORG the keepers of the software you are using.
This site is for support of sites hosted on WordPress.COM. You should address your questions to WordPress.ORG the keepers of the software you are using: http://wordpress.org/support/
For more on the difference: http://support.wordpress.com/com-vs-org/
Oh, now I understand the difference. Sorry to shout out to the wrong side of the fence.
Thanks a bunch.
Also, yeah the things you find on google’s hot trends are pretty strange. Mike Huckabee, “heart attack grill”, gonorrhea, etc. I’m hoping to scare the public with their own curiosities.
The topic ‘How to Add Tags when posting via PHP’ is closed to new replies.