Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 15th, 2013  |  syntax: PHP  |  size: 0.43 KB  |  hits: 38  |  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. <h1>Blekko</h1>
  2.  
  3. <?php
  4.  
  5. $cerv = 'http://blekko.com/ws/?q=cervantes+/json&auth=f4c8acf3';
  6. $fx = curl_init();
  7.  
  8. curl_setopt($fx, CURLOPT_URL, $cerv);
  9. curl_setopt($fx, CURLOPT_RETURNTRANSFER, $cerv);
  10.  
  11. $newdata = curl_exec($fx);
  12. curl_close($fx);
  13.  
  14. $json = json_decode($newdata);
  15. var_dump($json->{'newitems'});
  16.  
  17. foreach($json->{'newitems'} as $newitems)
  18. {
  19.         echo $newitems->{'url_title'}. ": ".$newitems->{'snippet'}."<br>";
  20. }
  21. /*
  22. ?>