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 API proxy is a simple script which redirect HTTP request from user to twitter's official API URL.
Twitter is very popular, some governments don't like it. They use many different ways to block this website , makes it impossible to access to this website.
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
- Your company network doesn't allow you to access to twitter
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.
- Copy index-example.php to index.php and customize it.
- That's it !
twip is licensed under Mozilla Public License 1.1