</div>
                    </div>
                </div>
            </div>
        </div>
<?php 
    }
    ?>
   
    </div>

<?php 
} else {
    // snapdeal product feed url
    $url = 'http://affiliate-feeds.snapdeal.com/feed/72967.json';
    $result = snapdealApi::getData($url, 'json');
    ?>
   <div class="row">
   <?php 
    foreach ($result['apiGroups']['Affiliate']['listingsAvailable'] as $cat => $val) {
        ?>

   <div class="col-md-4 card" style="height:80px;">
      <a href="index.php?category=<?php 
        echo $cat;
        ?>
&url=<?php 
        echo base64_encode($val['listingVersions']['v1']['get']);
        ?>
" ><b><h3><?php 
        echo strtoupper(str_replace('_', ' ', $cat));
 public function __construct($affiliateID, $token)
 {
     self::$affiliateID = $affiliateID;
     self::$token = $token;
 }