Call a url and get a response php

     

Hi guys im trying to call a url and get some json from it this is the url


https://api.sandbox.blackhawknetwork.com/productCatalogManagement/v1/productCatalogs    can you help me with this?

  
"
answer1
  
  
      
  1. Define your HTTP-options  These tell the stream what to do.
  2.   
  3. Open a stream with stream_context_create
  4.   
  5. Read all response data with file_get_contents
  6.   

Looks like this:


$opts = [ 'http' => [   'header' => [ /* what headers you want */ ]