php - How To Read OPDS Catalog (ex : http://feedbooks.com/catalog.atom) -
i'm new in php. want read opds catalog (ex : http://feedbooks.com/catalog.atom) , store catalogs json file.
could suggest me how it, or point me usefull article/source code it?
open url (allow_url_fopen must switched on that, otherwise take @ curl)
$content = file_get_contents('http://feedbooks.com/catalog.atom'); $xml = new simplexmlelement($xmlstr); print_r($xml); the print_r show object received, alter object , create json via json_encode($xml), , write file.
alternatively can use yahoo pipe read feed , output json.
$json = file_get_contents('http://pipes.yahoo.com/pipes/pipe.run?_id=29ec5982a8bede87d83a402f7f8ac0ec&_render=json'); that's actual pipe: http://pipes.yahoo.com/pipes/pipe.run?_id=29ec5982a8bede87d83a402f7f8ac0ec&_render=json
Comments
Post a Comment