/* returns tweetDetails */
function returnTweets()
{
$return = array();
$url = $hashtagSearchUrl = "http://search.twitter.com/search.json?q=%23gencsengeleceksin&include_entities=1&result_type=recent&rpp=50";
foreach(json_decode(file_get_contents($url))->results as $t)
{
$return[] = $t;
}
return $return;
}
/* assigns tweet details to a variable */
$ts = returnTweets();
foreach ($ts as $t)
echo $t->id."<br />";
這必須輸出推文ID的列表。例如:返回浮點而不是整數
190914827918857531
190914827918845655
165456467265456156
一般來說它的工作,但在一些服務器它的返回是這樣的:
1.9090219393785E+17
我怎樣才能解決這個問題?
將其轉換爲字符串。 – j08691 2012-04-13 21:02:20
這裏是我的猜測:http://stackoverflow.com/questions/94591/what-is-the-maximum-value-for-a-int32 – Madbreaks 2012-04-13 21:02:28
@ j08691,有什麼建議嗎? – Eray 2012-04-13 21:02:57