cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Curl + Php + Orkut

From: Elias Rezende <aafdzelias_at_gmail.com>
Date: Tue, 24 Jun 2008 16:42:28 -0300

Good afternoon.
My name is Elias.
I'm trying to develop an application in PHP to send a picture to a
particular album on Orkut.
We have managed to access orkut, authenticate, select the album for which
IŽll send the photo.
Only not to upload.
One message says: POST requests require a content-length header.

The code is:

        $campos[$campo] = "@".$arquivo;
        $campos["POST_TOKEN"] = "C9C1D56D6E4580D2073A1F1B829856A6";
        $campos["signature"] = "CqgAr5eSvAzQ2A/h21nrH6OSYAY=";
        $campos["Action.upload"] = "";

    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_COOKIE, $cookie);
    curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLINFO_HEADER_OUT, true);
     curl_setopt($ch, CURLOPT_POST, 1 );

curl_setopt($ch, CURLOPT_POSTFIELDS, $campos);
           curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);

Can anyone help?

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-06-24