This is the function that I use to capture the JSON file from the Feedbin API .
<?php error_reporting(E_ALL); // JSON URL which should be requested $json_url = 'https://api.feedbin.me/v2/entries.json'; $username = 'my_username'; // authentication $password = ' my_password'; // authentication // Initializing curl $ch = curl_init( $json_url ); // Configuring curl options $options = array( CURLOPT_RETURNTRANSFER => true, CURLOPT_USERPWD => $username . ":" . $password // authentication ); // Setting curl options curl_setopt_array( $ch, $options ); // Getting results $result = curl_exec($ch); // Getting JSON result string print_r ($result); ?>
The problem is that JSON I get a little .. weird. It has many characters like \ u003E \ u003C / a \ u003E \ u003C / p \ u003E \ n \ u003Cp \ u003E ... You can see the JSON here .
source share