In a set of programs, all domain names must be extracted from the specified URL page. The modern CODE is as follows: & quot; $ CODE ......; get the remote URL content $ temp & quot; I & quot; preg_match_all ($ temp, $ CODE, $ Jzz_thlld); $ Jzz_thlld [0]; $ temp & quot; href [& quot; & #39;]? Http: \ www \. ([^ & gt; & quot; & #39;] +) [& quot; & #39;] regular php
In a program, all domain names must be extracted from the specified URL page. The modern code is as follows:
$ CODE = ......; // Obtain the remote URL content $ temp = "// I"; preg_match_all ($ temp, $ CODE, $ Jzz_thlld); $ Jzz_thlld = $ Jzz_thlld [0]; $ temp = "/href = [\" ']? Http: \/www \. ([^> \ "'] +) [\"']? \ S * [^>] *> (. *) <\/a>/si "; for ($ dos_skipping = 0; $ dos_skipping <sizeof ($ Jzz_thlld); $ dos_skipping ++) {preg_match ($ temp, $ Jzz_thlld [$ dos_skipping], $ tempurl); if (! ($ Tempurl [1]! = "")&&! (Strpos ($ tempurl [1], "? ") = FALSE )&&! (Strpos ($ tempurl [1], "&") === FALSE )&&! (Strpos ($ tempurl [1], "#") === FALSE )&&! (Strpos ($ tempurl [1], ":") === FALSE )&&! (Strpos ($ tempurl [1], "") = FALSE) {echo '99'; $ url_temp = "www. ". $ tempurl [1]; if (0 <strpos ($ url_temp, "/") {$ url_arr = explode ("/", $ url_temp ); $ url_temp = $ url_arr [0];} if ($ Jzz_cbgsf = "") {$ Jzz_cbgsf = $ url_temp;} else if (strpos ("| ". $ Jzz_cbgsf. "|", "| ". $ url_temp. "|") = FALSE) {$ Jzz_cbgsf. = "| ". $ url_temp ;}}}
The required information cannot be obtained in the above code as required. Please help us to see how to modify it !!