Advertisement
Shiny_

Untitled

Mar 29th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.90 KB | None | 0 0
  1. <?php
  2.     include('wapi.php');
  3.    
  4.     $wapi = new libs_Wapi('API', 'API');
  5.     echo '<!DOCTYPE html>
  6.        <html>
  7.            <head>
  8.                <meta charset = "UTF-8"></meta>
  9.            </head>
  10.            <body>
  11.                <h1>Ilość tagów:</h1>';
  12.     $result = $wapi->doRequest('HashTagsNotificationsCount');
  13.     if($wapi->isValid()) {
  14.         echo '<ul>';
  15.         foreach($result as $r) {
  16.             echo '<li>' . $r['title'] . '</li>';
  17.         }
  18.         echo '</ul>';
  19.     } else {
  20.         echo $wapi->getError();
  21.     }
  22.     echo '<h1>Dowcipy z mikrobloga</h1>';
  23.     $result = $wapi->doRequest('search/entries', array('q' => '#suchar'));
  24.     if($wapi->isValid()) {
  25.         echo '<ul>';
  26.         foreach($result as $r) {
  27.             echo '<li>' . $r['body'] . '</li>';
  28.         }
  29.         echo '</ul>';
  30.     } else {
  31.         echo $wapi->getError();
  32.     }
  33.     echo "</html>";
  34. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement