Hey Guys ,
I'm trying to make a simple C project in Linux , to update my status
on twitter .
but i get a HTTP 302 found messages all the time . my code is below
can u help me?

char message[1000]="";
    char details[100]="user:password";
    char UserPass[100];
    int msglen;
    char status[30]="status=d d d d damn !!!";
    msglen=strlen(status);
    BASE64_encode(&details,UserPass);

    sprintf(message,"POST /statuses/update.xml HTTP/1.1\r
\nAuthorization: Basic %s\r\nHost: twitter.com\r\nContent-Length: %d\r
\n\r\n%s",UserPass,msglen,status);
     write(sd,&message,strlen(message));
     read(sd,&buf,200);
     printf("%s\n",&buf);

thanx.

Reply via email to