[twitter-dev] Re: API & Curl: Status update result: http_code =>0!

2009-07-24 Thread lda

Thx worked

On 20 Jul., 20:27, Chad Etzel  wrote:
> Ah, I think I may have an idea...
>
> You both are setting the status in the query string (more like a GET
> request) and setting curl_setopt($ch, CURLOPT_POST, 1).
>
> But, It doesn't look like either of you are setting a POSTFIELDS
> option.  I gothttp_code=>0sometime ago when I realized I was not
> sending a POST body along with a POST request.
>
> So, try setting curl_setopt(CURLOPT_POSTFIELDS, "");  (yes, it's just
> an empty string, but it creates the content-length header in the
> request) and then see what happens.
>
> -Chad
>
> On Mon, Jul 20, 2009 at 11:23 AM, lda wrote:
>
> > nobody an idea?


[twitter-dev] Re: API & Curl: Status update result: http_code =>0!

2009-07-20 Thread lda

nobody an idea?


[twitter-dev] Re: API & Curl: Status update result: http_code =>0!

2009-07-16 Thread lda

I have same issue...

with curl_setopt($ch, CURLOPT_POST, 1);

i get this

* About to connect() to twitter.com port 80 (#0)
*   Trying 168.143.162.100... * connected
* Connected to twitter.com (168.143.162.100) port 80 (#0)
* Server auth using Basic with user 'x'
> POST 
> /statuses/update.xml?status=http%3A%2F%2Flocalhost%2Fent_umgebung%2Findex.php%3Foption%3Dcom_content%26view%3Darticle%26id%3D99+adasd
>  HTTP/1.1

Authorization: Basic x
Host: twitter.com

Accept: */*

Content-Length: 0

Content-Type: application/x-www-form-urlencoded



* Closing connection #0
* Failed to open/read local data from file/application

but the tweet shows up at twitter.com

---
with curl_setopt($ch, CURLOPT_POST, 0);

i get this

* About to connect() to twitter.com port 80 (#0)
*   Trying 168.143.162.116... * connected
* Connected to twitter.com (168.143.162.116) port 80 (#0)
* Server auth using Basic with user 'xxx'
> GET 
> /statuses/update.xml?status=http%3A%2F%2Flocalhost%2Fent_umgebung%2Findex.php%3Foption%3Dcom_content%26view%3Darticle%26id%3D100+asdsd
>  HTTP/1.1

Authorization: Basic 
Host: twitter.com

Accept: */*



< HTTP/1.1 400 Bad Request

< Date: Thu, 16 Jul 2009 22:19:04 GMT

< Server: hi

< Last-Modified: Thu, 16 Jul 2009 22:19:04 GMT

< Status: 400 Bad Request

< X-RateLimit-Limit: 150

< X-RateLimit-Remaining: 148

< Pragma: no-cache

< Cache-Control: no-cache, no-store, must-revalidate, pre-check=0,
post-check=0

< Content-Type: application/xml; charset=utf-8

< X-RateLimit-Reset: 1247783018

< Content-Length: 256

< Expires: Tue, 31 Mar 1981 05:00:00 GMT

< X-Revision: f4f87122b27713088b558c6b57aad4f73e83a56d

< X-Transaction: 1247782744-54919-16662

< Set-Cookie: lang=en; path=/

< Set-Cookie:
_twitter_sess=BAh7CToTcGFzc3dvcmRfdG9rZW4iLWI3YmU3OTRiMDVjNzRkNmYwMWU5NmVk
%250AOTc0ZWFjY2M4Y2MzNjliOWY6CXVzZXJpBCwYXwM6B2lkIiViZWQxNTkzMWZm
%250AMjFiYWZlZWIwYjI3NmZmM2VlOGNmOCIKZmxhc2hJQzonQWN0aW9uQ29udHJv
%250AbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%253D
%253D--833c18afbc67a08e2c62ee0e278ac6eafb304123; domain=.twitter.com;
path=/

< Vary: Accept-Encoding

< Connection: close

<

* Closing connection #0

and the twitter dont show up at twitter.com