The phpcurl instance code is as follows: session_write_close (); $ pageurlquot; http :...
// Php curl instance code: session_write_close (); $ pageurl = "http://www.phprm.com/index.html"; curl_setopt ($ ch, curlopt_returntransfer, 1); curl_setopt ($ ch, curlopt_url, $ pageurl ); $ html = curl_exec ($ ch); curl_close ($ ch); // then you need to fix pathing to absolute $ search = "/(src | href | background) = "[^:, ^>, ^"] * "/I"; preg_match_all ($ search, $ html, $ a_matches); // php fopen instance, the code is as follows: $ file = fopen ("http://www.phprm.com/", "r"); // read remote files $ file = fopen ("a.txt", "r "); // read the local file // php file_get_contents $ homepage = file_get_contents ('http: // www.phprm.com/'); // read remote text echo $ homepage ;: // <= php 5 $ file = file_get_contents ('. /lele.txt ', true); //> php 5 $ file = file_get_contents ('. /people.txt ', file_use_include_path); // open local text
Address:
Reprinted at will, but please attach the article address :-)