Last active
April 8, 2018 11:43
-
-
Save sharkyak/62cd8c0bd7663056be93583c32bd0c8a to your computer and use it in GitHub Desktop.
curl
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 get_data($url) { | |
$curl = curl_init(); | |
curl_setopt($curl, CURLOPT_URL, $url); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
$out = curl_exec($curl); | |
curl_close($curl); | |
$out = json_decode($out); | |
return $out; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice :)