Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.40 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  function ungzip($data) {
  2.   $len = strlen($data);
  3.   if ($len < 18 || strcmp(substr($data,0,2),"\x1f\x8b")) {
  4.     return null;
  5.   }
  6.   $method = ord(substr($data,2,1));
  7.   $flags  = ord(substr($data,3,1));
  8.   if ($flags & 31 != $flags) {
  9.    
  10.     return null;
  11.   }
  12.  
  13. print ungzip(file_get_contents('http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/toppaidapplications/limit=25/xml'));