Page 1 of 1

help catching api statuses

Posted: Mon Nov 30, 2009 11:09 am
by fred2009
hi all,
i'm currently using a 3rd party API that i can request via http and which is returning me XML as a response.
XML feed returned is below:
<resultat>
<etat>
<status>200</status>
</etat>
<donnees>
<id>c30kg2tC4Agfq19UbS7Q</id>
</donnees>
</resultat>

I succeeded in catching <status> value by using simplexml_load_file() but what I would like to do is for one single <id> to catch the value of <status> each second so I can get dynamically the value and print it within an html page

I'm missing this part of the code which would refresh the status and display in html
thanks for your help

Re: help catching api statuses

Posted: Mon Nov 30, 2009 1:58 pm
by requinix
fred2009 wrote:but what I would like to do is for one single <id> to catch the value of <status> each second so I can get dynamically the value and print it within an html page
Don't.

Re: help catching api statuses

Posted: Mon Nov 30, 2009 2:18 pm
by fred2009
what do you mean by "don't"?

Re: help catching api statuses

Posted: Mon Nov 30, 2009 7:27 pm
by requinix
fred2009 wrote:what do you mean by "don't"?
You're talking about polling this one website/service once a second, right?

Re: help catching api statuses

Posted: Tue Dec 01, 2009 2:07 am
by fred2009
Yes exactly and the company im using their api is ok with that even half a second