For some reason, the allow_url_fopen option of php is disabled, that is, file_get_contents cannot be directly used to obtain the content of the remote web page. That is, you can use another function curl.
Unlimited file_get_contents function for obtaining remote webpage content
Function vita_get_url_content ($ url ){
If (function_exists ('file _ get_contents ')){
$ File_contents = file_get_contents ($ url );
} Else {
$ Ch = curl_init ();
$ Timeout = 5;
Curl_setopt ($ ch, curlopt_url, $ url );
Curl_setopt ($ ch, curlopt_returntransfer, 1 );
Curl_setopt ($ ch, curlopt_connecttimeout, $ timeout );
$ File_contents = curl_exec ($ ch );
Curl_close ($ ch );
}
Return $ file_contents;
}
/*
For some reason, the allow_url_fopen option of the php tutorial is disabled, that is, file_get_contents cannot be directly used to obtain the content of the remote web page. That is, you can use another function curl.