Advertisement
ghiwar

Dojo trending

May 25th, 2023
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <?php
  2. $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[SERVER_NAME]";
  3. $keywords = json_decode(file_get_contents('http://tools.dojo.cc/api/trends/p1/keywords'), true);
  4. foreach($keywords as $keyword){
  5. echo '<ul>';
  6. echo '<li><a href="'.$actual_link.'/'. strtolower(str_replace(' ', '-', $keyword)) . '.html">' . $keyword . '</a></li> ';
  7. echo '</ul>';
  8. }?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement