I keep getting this message when trying to post a new photo to an
album:
"Content-Type application/x-www-form-urlencoded is not valid."
Not sure how to fix this. Here is my request:
$action = "http://picasaweb.google.com/data/feed/api/user/
{my_username}/album/{my_album}";
$headers = array("Authorization: GoogleLogin token=$token", "Content-
Type: image/jpeg", "Content-Length: 66877");
$ch = curl_init();
$post_data = file_get_contents("dis_logo.jpg");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_URL, $action);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADDER, $headers);
curl_setopt($ch, CURLOPT_REFERER, $action);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookiejar.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiejar.txt");
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
$resp = curl_exec($ch);
Thanks in advance,
-Kenny