echo "HHello";
die();
//include("settings.php");
$pid ='77A93243';
$secret_key='68E4B5FF61A4A';
// Set the content type to XML
header('Content-type: application/xml; charset=utf-8');
// Print the XML declaration and the opening tags for the sitemap
echo '';
echo '';
// Fetch data from the API
$fetchData = curl_init();
curl_setopt_array($fetchData, array(
CURLOPT_URL => 'https://abengines.com/api/v1/utilities-api/get_aurl.php?pid=' . urlencode($pid),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
));
$response = curl_exec($fetchData);
curl_close($fetchData);
$toJson = json_decode($response, true);
$URL = "https://www.abengines.com/secured/curl_settingdata.php?action=wlSitemapData&pid=" . $pid . "&key=" . $secret_key;
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $URL,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Content-Disposition: attachment",
"Authorization: Basic " . base64_encode("abe-ftp-Uaz8neth:xamae5OphiZaejee9Too"),
),
));
$resp = curl_exec($ch);
curl_close($ch);
$sitemapData = json_decode($resp, true);
// if (!$sitemapData) {
// echo '';
// echo '';
// exit;
// }
$deals = $sitemapData["deals"] ?? [];
$pages = $sitemapData["pages"] ?? [];
$blogs = $sitemapData["blogs"] ?? [];
//$site_url = "https://" . $site_url;
$site_url = "https://www.wickettravel.in"; // You can adjust this based on your needs
// Generate URLs for deals
if ($toJson) {
foreach ($toJson as $item) {
$pageRoot = '';
$preTag = '';
if ($item['service'] == 'Hotels') {
$pageRoot = 'hoteldeal';
$preTag = 'Hotels-In-';
} elseif ($item['service'] == 'Flights') {
$pageRoot = 'flightdeal';
$preTag = 'Cheapest-Flights-From-';
}
echo '
' . htmlspecialchars($site_url . '/' . $pageRoot . '/' . $preTag . $item['long_url'] . '/') . '
' . htmlspecialchars(date("Y-m-d\TH:i:s+00:00", strtotime($item['date_time']))) . '
daily
1.0000
';
}
}
// Generate URLs for pages
foreach ($pages as $page) {
echo '
' . htmlspecialchars($site_url . '/page/' . $page['page_name']) . '
' . htmlspecialchars(date("Y-m-d\TH:i:s+00:00", strtotime($page['date_time']))) . '
daily
1.0000
';
}
// Generate URLs for blogs
foreach ($blogs as $blog) {
echo '
' . htmlspecialchars($site_url . '/blog/' . $blog['slug']) . '
' . htmlspecialchars(date("Y-m-d\TH:i:s+00:00", strtotime($blog['date_time']))) . '
daily
1.0000
';
}
// Close the urlset tag
echo '';