views:

42

answers:

0

Hello All,

I have to import from an api http://somegoodrecipe.com/recipes/?format=json.

It has 5 components:

  1. recipe_id
  2. recipe_title
  3. recipe_thumbnail (image)
  4. recipe_swf_url (flash)
  5. recipe_description

I can use this to print it out:

$json = file_get_contents("http://somegoodrecipe.com/recipes/?format=json", true);
$decode = json_decode($json, true);



$count = count($decode); 

for($i=0;$i<$count;$i++){

    echo $decode[$i][recipe_thumbnail]."<br>";

}

Instead of just printing it out, I need to import the id title and description in mysql or mongo and upload the other two to my own S3 bucket to use s3 as a cdn.

Can someone help?