Created
October 14, 2013 22:17
-
-
Save jcnevado/6983175 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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