Advertisement
soulgriever

Untitled

Nov 30th, 2021
929
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.59 KB | None | 0 0
  1. <?php
  2.  
  3. $modpackjson = file_get_contents('http://play.pineserver.com/TechnicSolder/public/index.php/api/modpack/pine');
  4.  
  5. $version = json_decode($modpackjson,true);
  6.  
  7. $latest = $version['latest'];
  8.  
  9. $lateurl = "http://play.pineserver.com/TechnicSolder/public/index.php/api/modpack/pine/$latest";
  10.  
  11. $json = file_get_contents("$lateurl");
  12.  
  13. $data = json_decode($json,true);
  14.  
  15.  
  16.  
  17.     foreach($data['mods'] as $item) {
  18.  
  19.         $Mname = $item['name'];
  20.  
  21.         $url = "http://play.pineserver.com/TechnicSolder/public/index.php/api/mod/$Mname";
  22.  
  23.         $Mjson = file_get_contents("$url");
  24.  
  25.         $Mdata = json_decode($Mjson,true);
  26.  
  27. ?>
  28.  
  29. <div class="row col-lg-offset-1 col-lg-10">
  30.  
  31.         <div class="panel panel-default autocollapse2">
  32.  
  33.             <div class="panel-heading clickable">
  34.  
  35.                 <h3 class="panel-title">
  36.  
  37.                     <i class="fa fa-plus" aria-hidden="true"></i> <?php echo $Mdata["pretty_name"] ?><span class="badge"><?php echo $item['version'] ?></span>
  38.  
  39.                 </h3>
  40.  
  41.             </div>
  42.  
  43.             <div class="panel-body">
  44.  
  45.                 <p><i class="fa fa-user" aria-hidden="true"></i> Author: <strong><?php echo $Mdata["author"] ?></strong></p>
  46.  
  47.                 <p></p><i class="fa fa-home" aria-hidden="true"></i> Website: <a href="<?php echo $Mdata["link"] ?>" target="_blank"><?php echo $Mdata["link"] ?></a></p>
  48.  
  49.                 <br>
  50.  
  51.                 <p><?php echo $Mdata["description"] ?></p>
  52.  
  53.             </div>
  54.  
  55.         </div>
  56.  
  57. </div>
  58.  
  59. <?php
  60.  
  61. }
  62.  
  63. ?>
  64.  
  65. <script type="text/javascript" src="js/spoiler2.js"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement