Permalink
Browse files

First form of core method execute()

  • Loading branch information...
zeleznypa committed May 30, 2013
1 parent 0ae544e commit 0e32c3eddc04aad3b43ecb4b9fa8b8e59c57966b
Showing with 17 additions and 0 deletions.
  1. +17 −0 Zeleznypa/Curl/SimpleCurl.php
@@ -9,4 +9,21 @@
class SimpleCurl
{
/**
* Execute cURL request with defined params
* @author Pavel Železný <info@pavelzelezny.cz>
* @param string $url
* @param array $options
* @return string|bool Depend on option CURLOPT_RETURNTRANSFER
*/
public function execute($url, array $options = array())
{
$ch = curl_init($url);
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
}

0 comments on commit 0e32c3e

Please sign in to comment.