require_once 'config.php'; $page = isset($_GET['page']) ? $_GET['page'] : 'home'; // Handle domain search AJAX if (isset($_POST['action']) && $_POST['action'] === 'check_domain') { header('Content-Type: application/json'); $domain = trim($_POST['domain']); $url = "https://www.namesilo.com/api/checkRegisterAvailability?version=1&type=xml&key=" . NAMESILO_API_KEY . "&domains=" . urlencode($domain); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $response = curl_exec($ch); curl_close($ch); $xml = simplexml_load_string($response); $available = (string)$xml->reply->available[0]; echo json_encode([ 'success' => true, 'domain' => $domain, 'available' => ($available === $domain), 'price' => '12.99' ]); exit; } // Handle contact form if (isset($_POST['action']) && $_POST['action'] === 'contact') { $name = htmlspecialchars($_POST['name']); $email = htmlspecialchars($_POST['email']); $phone = htmlspecialchars($_POST['phone']); $message = htmlspecialchars($_POST['message']); $to = CONTACT_EMAIL; $subject = "New Contact Form Submission - Teniqs"; $body = "Name: $name\nEmail: $email\nPhone: $phone\n\nMessage:\n$message"; $headers = "From: $email\r\nReply-To: $email"; if (mail($to, $subject, $body, $headers)) { header('Location: contact.php?success=1'); } else { header('Location: contact.php?error=1'); } exit; } ?>
Ready to start your project? Get in touch with our team today.
Karachi, Pakistan
Serving clients globally
24/7 Emergency support available for active projects
Message us on WhatsApp for instant responses
Start Chatting →