Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel curl package

// we can still use native PHP curl, even in Laravel app )
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "SOME_URL_HERE".$method_request);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$output = curl_exec($ch);
curl_close($ch);
$this->response['response'] = json_decode($output);
Source by laracasts.com #
 
PREVIOUS NEXT
Tagged: #laravel #curl #package
ADD COMMENT
Topic
Name
8+7 =