Reputation: 1121
Good day.
i use code:
$file = file_get_contents('http://www.whois.com/whois/testtest.com');
Full code page whice get $file you can see here
Tell me please how get content in block <div class="whois_result" id="registryData">....</div>
?
Upvotes: 0
Views: 244
Reputation: 8349
Regardless of you you scrape the remote page (hint: look at cURL), you need some sort of DOM parser to parse the response.
libxml_use_internal_errors(true); //Prevents Warnings, remove if desired
$dom = new DOMDocument();
$dom->loadHTML($file);
$node = $dom->getElementById("registryData");
$output = $dom->saveHTML($node);
echo $output;
Upvotes: 2