> I am getting a 302 http code for a
> http://twitter.com/direct_messages.xmlrequest through the api.
> I looked through the google groups board, but most references were regarding
> http://twitter.com/direct_messages/new.xml
>
> Can anyone tell me what I am doing wrong here:
>
> This is my cURL
>
> $host = "http://twitter.com/direct_messages.xml?page=$page_num";
>
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL, $host);
> curl_setopt($ch, CURLOPT_VERBOSE, 1);
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
> curl_setopt($ch, CURLOPT_USERPWD, "$userUsername:$userPassword");
> curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
> curl_setopt($ch, CURLOPT_POST, 1);
> $result = curl_exec($ch);
> $responseInfo=curl_getinfo($ch);
> curl_close($ch);
>
> Thanks!
You might throw in a
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
If this doesn't fix it, you might want to post the output from a tracing
proxy such as Charles.
--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * [email protected]
-- Helmet: But when will Now be Then?!?! Sandurz: Soon. -- "Spaceballs" -------