// Domain WHOIS Lookup Shortcode for Elementor function whois_lookup_shortcode($atts) { $domain = isset($_POST['whois_domain']) ? sanitize_text_field($_POST['whois_domain']) : ''; if (!$domain) return '
'; $api_key = 'at_asFTPYWiFVUEbUAZ6pYCeAjWmkhpW'; // আপনার actual API key $api_url = "https://www.whoisxmlapi.com/whoisserver/WhoisService?apiKey={$api_key}&domainName={$domain}&output=json"; $response = wp_remote_get($api_url); if (is_wp_error($response)) return 'API Error'; $data = json_decode(wp_remote_retrieve_body($response), true); if (empty($data['WhoisRecord'])) return 'No data found'; $w = $data['WhoisRecord']; // যেহেতু আপনি বিস্তারিত চাচ্ছেন, নিচে সব ফিল্ড ম্যাপ করলাম $registrant = $w['registrant'] ?? []; $admin = $w['administrativeContact'] ?? []; $tech = $w['technicalContact'] ?? []; $html = '

Domain Info

'; $html .= "

Domain Name: {$w['domainName']}

"; $html .= "

Host IP: {$w['nameServers']['hostNames'][0] ?? 'N/A'}

"; // IP direct দেওয়া না থাকলে $html .= "

Registrar: {$w['registrarName']}

"; $html .= "

Service Provider: {$w['registrant']['organization'] ?? 'N/A'}

"; $html .= "

Registered On: {$w['createdDate']}

"; $html .= "

Age: " . (isset($w['createdDate']) ? floor((time() - strtotime($w['createdDate'])) / (365*24*3600)) . ' years' : 'N/A') . "

"; $html .= "

Expires On: {$w['expiresDate']}

"; $html .= "

Updated On: {$w['updatedDate']}

"; $html .= "

Registrar status: {$w['status']}

"; $html .= "

Name Servers: " . implode(', ', $w['nameServers']['hostNames'] ?? []) . "

"; // Site View – সাধারণত url $html .= "

Site View: {$domain}

"; // Registrant Info $html .= "

Registrant Info

Name: {$registrant['name']}
Organization: {$registrant['organization']}
Street: {$registrant['street1']}
City: {$registrant['city']}
Postal Code: {$registrant['postalCode']}
Country: {$registrant['country']}
Phone: {$registrant['telephone']}
Email: {$registrant['email']}

"; // Admin Info $html .= "

Admin Info

Name: {$admin['name']}
Organization: {$admin['organization']}
Street: {$admin['street1']}
City: {$admin['city']}
Postal Code: {$admin['postalCode']}
Country: {$admin['country']}
Phone: {$admin['telephone']}
Email: {$admin['email']}

"; // Technical Info $html .= "

Technical Info

Name: {$tech['name']}
Organization: {$tech['organization']}
Street: {$tech['street1']}
City: {$tech['city']}
Postal Code: {$tech['postalCode']}
Country: {$tech['country']}
Phone: {$tech['telephone']}
Email: {$tech['email']}

"; $html .= '
'; return $html; } add_shortcode('whois_tool', 'whois_lookup_shortcode'); Sample Page – My Blog

Sample Page

This is an example page. It’s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:

Hi there! I’m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like piña coladas. (And gettin’ caught in the rain.)

…or something like this:

The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.

As a new WordPress user, you should go to your dashboard to delete this page and create new pages for your content. Have fun!

Scroll to Top