Skip to content

Instantly share code, notes, and snippets.

@sharkyak
Last active April 8, 2018 11:43
Show Gist options
  • Save sharkyak/62cd8c0bd7663056be93583c32bd0c8a to your computer and use it in GitHub Desktop.
Save sharkyak/62cd8c0bd7663056be93583c32bd0c8a to your computer and use it in GitHub Desktop.
curl
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;
}
@johnmahugu
Copy link

nice :)

@johnmahugu
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment