title: how to use curl in php to fetch value from a API
body: <p>I need to fetch data from an API using curl. As per the manual given the curl command should be like this</p>
  
  <pre><code>curl --user {YOUR_CLIENT_ID}:{YOUR_CLIENT_SECRET} https://www.udemy.com/api-2.0/courses
  </code></pre>
  
  <p>Now while passing this command in pUTTY I am getting response and the data is displaying correctly but how to use this in a PHP page...am quiet new with cURL so any suggestion would help me a lot.</p>
  
  <p>Thanks in advance</p>