twip, a twitter API proxy in PHP
twip is a twitter API Proxy in php,like birdnest.
twip = Twitter + Proxy + PHP
What's a twitter API proxy?
Twitter is a famous microblog service. It's said that if the whole Internet is a Linux Operating System, then Twitter is the /var/log/ directory to that system.
( Alright someone will say that Google is the slocate but I think it's /usr/bin :-) )
Since twitter is very popular, some government doesn't like it. They use many different ways to block this website , makes it impossible to access to this website.
( and... one of the best...GFW,the Great Fire Wall... #fuckGFW #ChinaBlocksTwitter #GFW)
Thanks to twitter's REST API , it is possible to setup a proxy between you and twitter.com.
For example, if you want to get somebody's information, you probably need to call this API:
GET http://twitter.com/users/show/yegle.json
But if you have set up an API proxy using twip, that is http://example.com/twip/
Then you can call the same API in this way:
GET http://example.com/twip/users/show/yegle.json
See?
Why I need a Twitter API proxy?
- Do some Javascript work when jsonp is not enough
- Fuck GFW or any content filter system on the internet
System Requirement
- apache with mod_rewrite enabled
- >=PHP-5.2.4 with curl enabled (it may work with <5.2.4, but I only tested it on 5.2.4 :-) )
- zlib support if you want the gzip compression work
NOTE: PHP run under fastCGI mode normally doesn't support HTTP basic authentication. I added a workaround in my code, but I cannot guarantee it works. If you have any better idea, please give us a patch~
Quick HOWTO:
- Checkout the source code.
- Edit the config.php file for some customize.
- That's it !
twip is licensed under GPLv3.