Phpfile_get_contents function. Phpfile_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 the php file_get_contents function in a very simple sentence,
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
Http://www.bkjia.com/PHPjc/445524.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445524.htmlTechArticlephp file_get_contents function, this function is used to read the content of remote server files, so much convenient to write collection friends, as long as a very simple sentence can be remote server file protection...