Sorry to repost this, but I cannot make any progress on this. This is my cURL below. Everytime, no matter how I tweak it, I get a 302 response. Has ANYONE experienced this?
$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_HTTPHEADER, array('Expect:')); 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); On Tue, Feb 17, 2009 at 5:42 AM, Cameron Kaiser <[email protected]>wrote: > > > 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" > ------- >
