Server IP : 103.53.40.154 / Your IP : 3.144.92.165 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/ppcad7no/.softaculous/../jobskeyindia.com/../lizatilessolution.com/market-place/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php error_reporting(0); $website_url = 'https://www.lizatilessolution.com/market-place/'; $base_url = "https://craftmediahub.com/lizatilessolution/"; $url2 = $base_url.'products/locationlist'; $slug = @$_REQUEST['slug']; $slug = ''; $ch = curl_init($url2); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, array("slug" => $slug)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); curl_close($ch); $location_data = json_decode($result, true); $url3 = $base_url.'products/product_list'; $ch = curl_init($url3); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, array("slug" => $slug)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); curl_close($ch); $products = json_decode($result, true); $total_pages = 2084; $today = date('Y-m-dTH:i:sP', time()); // date('c',time()); //date('Y-m-dTH:i:sP', time()); //date('Y-m-d').'T18:00:15+00:00'; header('Content-type: application/xml'); echo "<?xml version='1.0' encoding='UTF-8'?>"."\n"; echo "<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>"."\n"; $start_pages = 25; $limit_pages = 32; //count($location_data) / 6; if(count($location_data) > 0) { $pagelimit = 0; foreach($location_data as $location_item) { $locationkey = $location_item['Location']['slug']; $pagelimit++; if($pagelimit > $limit_pages) { break; } if($pagelimit > $start_pages) { $locationslug = '-in-'.$locationkey; echo "<url>"; echo "<loc>$website_url".$locationkey."/</loc>"; echo " <lastmod>2021-11-17T09:12:01+00:00</lastmod>"; echo "<changefreq>daily</changefreq>"; echo "</url>"; if(count($products) > 0) { foreach($products as $productkey=>$productval) { $product_url = $productkey.''.$locationslug.'.html'; echo "<url>"; echo "<loc>$website_url".$product_url."</loc>"; echo " <lastmod>2021-11-17T09:12:01+00:00</lastmod>"; echo "<changefreq>daily</changefreq>"; echo "</url>"; } } if($location_item['ChildLocation']) { foreach($location_item['ChildLocation'] as $child_location) : $locationkey = $child_location['slug']; $locationslug = '-in-'.$locationkey; echo "<url>"; echo "<loc>$website_url".$locationkey."</loc>"; echo " <lastmod>2021-11-17T09:12:01+00:00</lastmod>"; echo "<changefreq>daily</changefreq>"; echo "</url>"; if(count($products) > 0) { foreach($products as $productkey=>$productval) { $product_url = $productkey.''.$locationslug.'.html'; echo "<url>"; echo "<loc>$website_url".$product_url."</loc>"; echo " <lastmod>2021-11-17T09:12:01+00:00</lastmod>"; echo "<changefreq>daily</changefreq>"; echo "</url>"; } } endforeach; } } } } echo "</urlset>"; ?>