
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
<?php
// Get agent details from URL parameters
$name = isset($_GET['name']) ? urldecode($_GET['name']) : 'Agent Name';
$phone = isset($_GET['phone']) ? urldecode($_GET['phone']) : '+966000000000';
$location = isset($_GET['location']) ? urldecode($_GET['location']) : 'Showroom Location';
$text = isset($_GET['text']) ? urldecode($_GET['text']) : 'WAB';

// Set the content headers for the VCF file
header('Content-Type: text/x-vcard');
header('Content-Disposition: attachment; filename="Autozone Contact.vcf"');

// Generate VCF file content
$vcfContent = "BEGIN:VCARD\n";
$vcfContent .= "VERSION:3.0\n";
$vcfContent .= "FN:" . $name . "\n";
$vcfContent .= "TEL;TYPE=cell:" . $phone . "\n";
$vcfContent .= "ORG:".$name."\n";
$vcfContent .= "ADR;TYPE=work:;;" . $location . "\n";
$vcfContent .= "URL:" .$text. "\n";
$vcfContent .= "END:VCARD\n";

// Output VCF content
echo $vcfContent;
exit;
?>