Php file_get_contents function,
This function is used to read the content of the Remote Server File, which greatly facilitates the collection of friends. You can save the remote server file to your own database with a simple sentence, you can't simply say no. Let's take an example.
Function getcontent ($ url ){
$ Retmsg =File_get_contents('Http://111cn.cn/index.html ');
Return $ retmsg;
}
In this case, the remote content you want is stolen from you. However, there is an ob_get_contents () function that is the same as the file_get_contents function, but I heard that the effect is better.
/*
$ Ch = curl_init ($ url );
Ob_start ();
Curl_exec ($ ch );
$ Retmsg = ob_get_contents ();
Ob_clean ();
Ob_end_flush ();
Curl_close ($ ch );
*/
Well, I will talk about it here only when you use it. Please note the original reposted on this site: www.111cn.cn