PHP - check json value after one hour
<p>I have created a function, which get twitter count using json.</p>

<p>But, I want to recheck it agian after some time, like an hour. But currently it checks every time when a page loads. and which effect page loading time.</p>

<p>there is already a PHP function which do exactly what i want, but I cant remember it, I just remember that the function start from <code>tr....</code> </p>

<p>Here is my function, which check twitter follower :</p>

<pre><code>function follower( $tw ) {      
    $tw =  @json_decode(file_get_contents('http://api.twitter.com/1/users/show.json?screen_name='.$tw));
    $tw_followers = number_format($tw-&gt;followers_count); 

    return $tw_followers;
}
</code></pre>

<p><strong>EDIT:</strong></p>

<p>I found that PHP function:</p>

<pre><code>set_transient('follower', $tw_followers, 60*60*24);
</code></pre>

<p>please guide me if I am wrong</p>
