=15 ){ $nos= $no_of_products +18; }else if ($no_of_products>=10 ){ $nos= $no_of_products +10; }else if ($no_of_products>=6 ){ $nos= $no_of_products +5; }elseif ($no_of_products <=4 ){ $nos= $no_of_products +3; } $nos=($no_of_products )+ intval ($no_of_products * .75); $url=mycbgenie_fetch_url_in_ajax ('http://clickbankproads.com/xmlfeed/wordpress_ads/ads.asp?nos='.$nos.'&kws='.$kws,$ref); //echo 'ss'.$url; // $url= ('https://cbproads.com/xmlfeed/wordpress_ads/ads.asp?nos='.$nos.'&kws='.$kws); //$opts = array( 'http'=>array( 'header' => 'Connection: close' )); //$context = stream_context_create($opts); //$json = json_decode(file_get_contents($url, false, $context)); $json = json_decode(mycbgenie_ads_file_get_contents_curl($url,0,null,null)); $cnt=0; foreach ($json as $key=>$value) { foreach ($value as $key => $val) { if ($key=='title') { $title= $val;} if ($key=='descr') { $descr= $val;} if ($key=='mdescr') { $mdescr= $val;} if ($key=='image_name') { $image_name= $val;} if ($key=='altimage') { $altimage= $val;} if ($key=='ids') { $ids= $val;} $title=htmlspecialchars($title); $descr=htmlspecialchars($descr); } $term_link = "?action=mycbgenie_ads_view&tracking_id=".$tracking_id."&id=".$ids; if ($show_product_descr!=1){ $descr=''; $mcg_ht=0;} else { if ($cols==1) { $mcg_ht=30; } if ($cols==2) { $mcg_ht=40; } if ($cols==3) { $mcg_ht=65; } if ($cols==4) { $mcg_ht=85; } if ($cols==5) { $mcg_ht=110; } if ($cols==6) { $mcg_ht=130; } if ($default_font_family!=1) { $descr='
'.$descr.'
'; }else { $descr='
'.$descr.'
'; } } if ($default_font_family!=1){ $title="
".$title."
"; } else { $title="
".$title."
"; } if ($image_name!="blank.gif" && $no_of_products > $cnt) { if ($cols==1 ) $mcg_ht=$mcg_ht+35; if ($cols==2 ) { $mcg_ht=$mcg_ht+20;} if ($cols==3 ) { $mcg_ht=$mcg_ht+35;} if ($cols==4 ) { $mcg_ht=$mcg_ht+40;} if ($cols==5 ) { $mcg_ht=$mcg_ht+50;} if ($cols==6 ) { $mcg_ht=$mcg_ht+60;} $cnt=$cnt+1; $mcg_ht =$mcg_ht + $im_width + 30; $thumb = "https://cbproads.com/clickbankstorefront/v4/send_binary.asp?equal=skip&im=".$image_name."&resize=".$im_width; if ($cols==1) { $mcg_wd = 92; } if ($cols==2) { $mcg_wd = 45; } if ($cols==3) { $mcg_wd = 30; } if ($cols==4) { $mcg_wd = 22; } if ($cols==5) { $mcg_wd = 17; } if ($cols==6) { $mcg_wd = 14; } // if ($cols==1) { $bdr= 'border-bottom: 1px solid #ddd';} //else { $bdr= 'border: 1px solid #ddd'; } //if ($cnt== $no_of_products && $cols==1) { $bdr="";} $bdr= 'border: 1px solid #ddd'; $mcg_ht =$mcg_ht + 45; if ( !$show_read_more_btn) $mcg_ht=$mcg_ht-40; $mcg_ht=$mcg_ht+floor($height_adjustment); ?>
Clickbank Ads
'; } ?>