Skip to content

Instantly share code, notes, and snippets.

@jcnevado
Created October 14, 2013 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcnevado/6983175 to your computer and use it in GitHub Desktop.
Save jcnevado/6983175 to your computer and use it in GitHub Desktop.
function site_api_send($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, 'MD3');
curl_setopt($ch, CURLOPT_URL, $url );
curl_setopt($ch, CURLOPT_POST, 0);
// curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close ($ch);
$json = json_decode($response);
return $json;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment