如何获取我们从远程URL(解析)获取的块中的内容?

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> ?

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;