Does "loadHTMLfile" or "load" sends the requested url of page?
I would like to know if by using does the loaded page gets the address or anything related of the request-to-load site ? If so, what is the method of hiding or changing that ?
$dom = new DOMDocument;
libxml_use_internal_errors(TRUE);
$dom->load('www.domain.com');
libxml_clear_errors();
$xPath = new DO开发者_Python百科MXPath($dom);
The DOM will not have the URL added to it as a special property. So it would only be there if it's actually in the document (header, footer, meta tag, etc.).
EDIT: $dom
does actually have a documentURI
property containing the URL.
However, none of the calls output anything at all, which I think it what you man by a clean call. So the client won't see documentURI
unless you explicitly echo it somewhere.
精彩评论