This doesn't seem to be working for me. When I check my rate limit, it appears it's still applied to the IP address and not the account. I am trying to authenticate with the following script. Anyone have any tips? Does this look correct?
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://twitter.com/users/show/". $twitterUsername.".xml"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); curl_setopt($ch, CURLOPT_HTTPGET, 1); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($ch, CURLOPT_USERPWD, 'myusername:mypassword'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($ch); curl_close($ch); $twitterXML = simplexml_load_string($result); On Jan 15, 10:02 pm, Abraham Williams <4bra...@gmail.com> wrote: > Yes you can make the calls using basic authentication to target the rate hit > to the account. > > > > On Fri, Jan 15, 2010 at 12:50, Robb <robert.stro...@gmail.com> wrote: > > Hello all, > > I am developing a Twitter web app currently on shared hosting. The > > only Twitter API call that I make is an unauthenticated call to users/ > > show which is counted against my IP address API rate limit. I do not > > have a static IP address so I can't whitelist my IP until I get my own > > server. I can only whitelist my username. > > > Can I add my accont authentication to the following call: > > >http://twitter.com/users/show/username.xml > > > in order to count the rate limit against my username instead of my IP > > for every user that visits my site? > > > I am still a novice at PHP, especially security. Would it be ok for > > me to make this call with basic authentication inside a PHP script, > > only returning the bits of info that I need to the user? > > > Note that this feature of my site will not be behind a login for > > Twitter users, so I can not have users login and then have the API > > rate limit applied to their username. > > > Thanks for the help, > > Robb > > -- > Abraham Williams | Moved to Seattle | May cause email delays > Project | Intersect |http://intersect.labs.poseurtech.com > Hacker |http://abrah.am|http://twitter.com/abraham > This email is: [ ] shareable [x] ask first [ ] private. > Sent from Seattle, WA, United States