[twitter-dev] Re: Whitelisted IPs only work when authed?

2009-10-15 Thread Ajinkya Patil

Hello,
I also have similar problem, my app got whitelisted atleast 10 days
ago. And its the account from which i requested the whitelist, got
whitelisted, but the ip whitelist was still showing the same stuff
(i.e. 150 limit).
After readin this post and bit of google'in i solved the problem.

To check what ip is passed exactly to twitter with your requests use
the following code in a blank php file...
http://www.ipchicken.com/";);
?>

Then i replace that code with this to chk if CURLOPT_INTERFACE is
working...

http://www.ipchicken.com/';
$ch = curl_init();
curl_setopt($ch, CURLOPT_INTERFACE, '74.54.26.63');
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
print curl_exec ($ch);
curl_close ($ch);
?>

then u can again replace ipchicken.com with the twitter api call url
"http://twitter.com/account/rate_limit_status.xml"; to see if ur
response is changed.

Also if ur using epiTwitter class for interfacing with Twitter OAuth
(as im using)... add the following line in EpiTwitter.php after line
no. 38... (i.e. just after the $ch  = curl_init($url); line)...

curl_setopt($ch, CURLOPT_INTERFACE, $_SERVER ['SERVER_ADDR']);

 i've also notified on github to the author... but in the meanwhile,
this will surely help with those unauthenticated OAuth & API calls.

Hope this helps.

-Ajinkya

On Oct 10, 9:36 pm, Waldron Faulkner 
wrote:
> Are you sure your requests are coming from the same IP youwhitelisted? If 
> you're on a shared host, for example, your outbound
> requests may come from a different IP as your dedicated inbound IP. I
> had this issue, had to bind curl to my dedicated IP, and it worked
> fine. Setting the CURLOPT_INTERFACE option is what worked for me.
>
> On Oct 9, 5:08 pm, Charles  wrote:
>
> > I recently received email that confirmed my whitelisting status.  I
> > have several IPswhitelisted, as well as the account.  From a shell on
> > one of thewhitelistedservers, I make a couple requests and then try:
>
> > curlhttp://twitter.com/account/rate_limit_status.xml
>
> > 
> > 
> >   150
> >   1255123230 > seconds>
> >   2009-10-09T21:20:30+00:00
> >   147
> > 
>
> > If, on the other hand, I try:
>
> > curl -u username:passwordhttp://twitter.com/account/rate_limit_status.xml
>
> > 
> >   1
> >   2009-10-09T21:57:09+00:00
> >   2
> >   1255125429 > seconds>
> > 
>
> > I was under the impression I did not have to auth if I was making
> > calls from the API?  Also:  if I use my application's oauth
> > credentials to generate an oauth_request and use the oauth URL, I am
> > still getting the lower rate limit.  Is this normal behavior?


[twitter-dev] Re: Whitelisted IPs only work when authed?

2009-10-12 Thread Charles

Thank you, Waldron -- that may be the solution.  I will look into it!

On Oct 10, 11:36 am, Waldron Faulkner 
wrote:
> Are you sure your requests are coming from the same IP you
> whitelisted? If you're on a shared host, for example, your outbound
> requests may come from a different IP as your dedicated inbound IP. I
> had this issue, had to bind curl to my dedicated IP, and it worked
> fine. Setting the CURLOPT_INTERFACE option is what worked for me.
>
> On Oct 9, 5:08 pm, Charles  wrote:
>
> > I recently received email that confirmed my whitelisting status.  I
> > have several IPs whitelisted, as well as the account.  From a shell on
> > one of the whitelisted servers, I make a couple requests and then try:
>
> > curlhttp://twitter.com/account/rate_limit_status.xml
>
> > 
> > 
> >   150
> >   1255123230 > seconds>
> >   2009-10-09T21:20:30+00:00
> >   147
> > 
>
> > If, on the other hand, I try:
>
> > curl -u username:passwordhttp://twitter.com/account/rate_limit_status.xml
>
> > 
> >   1
> >   2009-10-09T21:57:09+00:00
> >   2
> >   1255125429 > seconds>
> > 
>
> > I was under the impression I did not have to auth if I was making
> > calls from the API?  Also:  if I use my application's oauth
> > credentials to generate an oauth_request and use the oauth URL, I am
> > still getting the lower rate limit.  Is this normal behavior?


[twitter-dev] Re: Whitelisted IPs only work when authed?

2009-10-10 Thread Waldron Faulkner

Are you sure your requests are coming from the same IP you
whitelisted? If you're on a shared host, for example, your outbound
requests may come from a different IP as your dedicated inbound IP. I
had this issue, had to bind curl to my dedicated IP, and it worked
fine. Setting the CURLOPT_INTERFACE option is what worked for me.

On Oct 9, 5:08 pm, Charles  wrote:
> I recently received email that confirmed my whitelisting status.  I
> have several IPs whitelisted, as well as the account.  From a shell on
> one of the whitelisted servers, I make a couple requests and then try:
>
> curlhttp://twitter.com/account/rate_limit_status.xml
>
> 
> 
>   150
>   1255123230 seconds>
>   2009-10-09T21:20:30+00:00
>   147
> 
>
> If, on the other hand, I try:
>
> curl -u username:passwordhttp://twitter.com/account/rate_limit_status.xml
>
> 
>   1
>   2009-10-09T21:57:09+00:00
>   2
>   1255125429 seconds>
> 
>
> I was under the impression I did not have to auth if I was making
> calls from the API?  Also:  if I use my application's oauth
> credentials to generate an oauth_request and use the oauth URL, I am
> still getting the lower rate limit.  Is this normal behavior?


[twitter-dev] Re: Whitelisted IPs only work when authed?

2009-10-09 Thread Chad Etzel

Please note: Bumping is highly discouraged. Bumping after 122 minutes
is *really* highly discouraged.
-Chad

On Fri, Oct 9, 2009 at 7:10 PM, Charles  wrote:
>
> Bump
>
> On Oct 9, 4:08 pm, Charles  wrote:
>> I recently received email that confirmed my whitelisting status.  I
>> have several IPs whitelisted, as well as the account.  From a shell on
>> one of the whitelisted servers, I make a couple requests and then try:
>>
>> curlhttp://twitter.com/account/rate_limit_status.xml
>>
>> 
>> 
>>   150
>>   1255123230> seconds>
>>   2009-10-09T21:20:30+00:00
>>   147
>> 
>>
>> If, on the other hand, I try:
>>
>> curl -u username:passwordhttp://twitter.com/account/rate_limit_status.xml
>>
>> 
>>   1
>>   2009-10-09T21:57:09+00:00
>>   2
>>   1255125429> seconds>
>> 
>>
>> I was under the impression I did not have to auth if I was making
>> calls from the API?  Also:  if I use my application's oauth
>> credentials to generate an oauth_request and use the oauth URL, I am
>> still getting the lower rate limit.  Is this normal behavior?
>


[twitter-dev] Re: Whitelisted IPs only work when authed?

2009-10-09 Thread Charles

Bump

On Oct 9, 4:08 pm, Charles  wrote:
> I recently received email that confirmed my whitelisting status.  I
> have several IPs whitelisted, as well as the account.  From a shell on
> one of the whitelisted servers, I make a couple requests and then try:
>
> curlhttp://twitter.com/account/rate_limit_status.xml
>
> 
> 
>   150
>   1255123230 seconds>
>   2009-10-09T21:20:30+00:00
>   147
> 
>
> If, on the other hand, I try:
>
> curl -u username:passwordhttp://twitter.com/account/rate_limit_status.xml
>
> 
>   1
>   2009-10-09T21:57:09+00:00
>   2
>   1255125429 seconds>
> 
>
> I was under the impression I did not have to auth if I was making
> calls from the API?  Also:  if I use my application's oauth
> credentials to generate an oauth_request and use the oauth URL, I am
> still getting the lower rate limit.  Is this normal behavior?