s.a arkadaşlar. php kullanarak veri cekmeye calışıyorum. site API desteği veriyor.

şimdi... bir sitenin atom ve json olarak 2 turlu kaynağı var:

site.com/search.atom?q=merhaba
site.com/search.json?q=merhaba

---
kaynağı ATOM gosterip (site.com/search.atom?q=merhaba) SimpleXMLElement ile veri cekebiliyorum.
$atom_search = new SimpleXMLElement($word);
BUNDA SORUN YOK.
---

ama kaynağı JSON gosterip (site.com/search.json?q=merhaba) SimpleXMLElement ile veri cekeMİYORUM.

belliki JSON kullanırken SimpleXMLElement yerine farklı birşey kullanacağız ama ne? bunu bir turlu bulamadım. yardımlarınızı bekliyorum. cok teşekkurler.

GUNCELLEME:
PHP:
$search = "http://site.com/search.json?q=".$q.""; $atom_search = new SimpleXMLElement($hede);

kaynağı JSON gosterip ve SimpleXMLElement kullandığımda aldığım hata:

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in C:AppServwwwprosearch.php:143 Stack trace: #0 C:AppServwwwprosearch.php(143): SimpleXMLElement->__construct(' thrown in C:AppServwwwprosearch.php on line 143