/ Published in: PHP
Expand |
Embed | Plain Text
<?php // The location of the cache file $cache_file = '/tmp/tweetmeme'; $url = 'http://api.tweetmeme.com/url_info'; // If the file doesn't exist or 1 hour has passed since the last update, write the new data to the file $xml_string = simplexml_load_string($data); // If there is data and the data is XML, write it if($data != '' AND $xml_string !== FALSE) { file_put_contents($cache_file, $data); } } else { } echo $data;
You need to login to post a comment.
