I'm guessing you probably need to make it a POST request:
curl_setopt($ch, CURLOPT_POST, 1);
and yes, you should probably change your password if it wasn't already
changed when you posted :D
For reference, here are all of the curlopts I set when making requests:
curl_setopt($ch, CURLOPT_URL, "$host");
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$pass");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_POST, 1);
-Chad
On Wed, Dec 24, 2008 at 1:54 PM, Alex Payne <[email protected]> wrote:
>
> You also want to obscure any passwords you paste as part of code samples.
>
> On Wed, Dec 24, 2008 at 09:50, Cameron Kaiser <[email protected]>
> wrote:
> >
> >> I'm a total n00b. Could somebody tell me why this code doesn't work?
> >
> > Can you be more specific about the exact failure? A trace from a proxy
> > such as Charles would also be helpful.
> >
> > --
> > ------------------------------------ personal:
> http://www.cameronkaiser.com/ --
> > Cameron Kaiser * Floodgap Systems * www.floodgap.com *
> [email protected]
> > -- The only thing to fear is fearlessness -- R. E. M.
> -------------------------
> >
>
>
>
> --
> Alex Payne - API Lead, Twitter, Inc.
> http://twitter.com/al3x
>