Created
September 13, 2022 05:19
-
-
Save MrWhiteD/4071c6edfc44b2016ef261dcb9a59a3b to your computer and use it in GitHub Desktop.
[file_get_content при отключенном allow_url_fopen] #php #allow_url_fopen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
function file_get_contents_curl($url) | |
{ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
$data = curl_exec($ch); | |
curl_close($ch); | |
return $data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment