tags:

views:

14

answers:

0

Hello, I'm trying to update post in my TypePad blog using PHP and cURL, but I can't get it to work.

Code follows

$ch = curl_init($post['url']);
$wsse = new WSSE($credentials['login'], $credentials['password']);
$wsseHeader = $wsse->get_header();
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, $post['content']);
curl_setopt($ch, CURLOPT_HTTPHEADER, array($wsseHeader));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

All I can get is error: "Can't use an undefined value as symbol reference". Could anyone explain me what I am doing wrong?