Created
April 15, 2012 08:14
-
-
Save shellexy/2390876 to your computer and use it in GitHub Desktop.
让 dabr api 限额提高到 1000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/dabr/common/twitter.php b/dabr/common/twitter.php | |
--- a/dabr/common/twitter.php | |
+++ b/dabr/common/twitter.php | |
@@ -376,6 +376,10 @@ function twitter_process($url, $post_dat | |
curl_setopt ($ch, CURLOPT_POST, true); | |
curl_setopt ($ch, CURLOPT_POSTFIELDS, $post_data); | |
} | |
+ if($post_data == false) | |
+ { | |
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-PHX: true')); | |
+ } | |
if (user_type() != 'oauth' && user_is_authenticated()) | |
{ | |
@@ -463,6 +467,7 @@ function twitter_fetch($url) { | |
curl_setopt($ch, CURLOPT_URL, $url); | |
//curl_setopt($ch, CURLOPT_TIMEOUT, 10); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-PHX: true')); | |
$response = curl_exec($ch); | |
curl_close($ch); | |
return $response; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment