Php Http Curl Get Request Example
Hi Guys,
In this example,I will learn you how to get http curl get request in php.you can easy and simply http curl get request in php.
This example is focused on php http curl get request example. We will look at example of php curl get request example. This post will give you simple example of php http request get parameters.
Example:
<?php
function httpGetRequest($url)
{
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$output=curl_exec($ch);
curl_close($ch);
return $output;
}
echo httpGetRequest("https://api.nicesnippets.com/api/users/6");
?>
It will help you...
- How To Use Php Conditional Statement Example
- How to Check if String Contains Regex in PHP?
- PHP Array_column() Function Example
- PHP Generate List of Random Numbers Between 0 and 100 Example
- How to User Login with Facebook in PHP?
- How to Explode Every Character into Array Using PHP Example?
- PHP Form Validation Tutorial
- PHP Convert XML to JSON Example