Skip to content

Instantly share code, notes, and snippets.

@ankitnetwork18
Created January 11, 2013 07:02
Show Gist options
  • Save ankitnetwork18/4508564 to your computer and use it in GitHub Desktop.
Save ankitnetwork18/4508564 to your computer and use it in GitHub Desktop.
CURL: send curl request to url without any data
function post_curl($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment