fork download
  1. <?php
  2. // Target URL
  3. $url = 'https://w...content-available-to-author-only...s.com/whois/autoscopevaluers.co.ke';
  4.  
  5. // Fetch HTML content
  6. $html = @file_get_contents($url);
  7.  
  8. // Check if the request was successful
  9. if ($html === false) {
  10. die("Failed to fetch content. Make sure allow_url_fopen is enabled.");
  11. }
  12.  
  13. // Load the HTML
  14. $dom = new DOMDocument;
  15. libxml_use_internal_errors(true); // Suppress warnings
  16. $dom->loadHTML($html);
  17.  
  18. // Create an XPath object
  19. $xpath = new DOMXPath($dom);
  20.  
  21. // Find elements with class 'whois-data'
  22. $nodes = $xpath->query("//*[contains(@class, 'whois-data')]");
  23.  
  24. // Extract and print content
  25. if ($nodes->length > 0) {
  26. foreach ($nodes as $node) {
  27. echo nl2br(trim($node->textContent)) . "<br>";
  28. }
  29. } else {
  30. echo "No WHOIS data found.";
  31. }
  32. ?>
  33.  
Success #stdin #stdout 0.02s 26328KB
stdin
Standard input is empty
stdout
Failed to fetch content. Make sure allow_url_fopen is enabled.