help catching api statuses

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fred2009
Forum Newbie
Posts: 3
Joined: Mon Nov 30, 2009 11:03 am

help catching api statuses

Post 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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: help catching api statuses

Post 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.
fred2009
Forum Newbie
Posts: 3
Joined: Mon Nov 30, 2009 11:03 am

Re: help catching api statuses

Post by fred2009 »

what do you mean by "don't"?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: help catching api statuses

Post by requinix »

fred2009 wrote:what do you mean by "don't"?
You're talking about polling this one website/service once a second, right?
fred2009
Forum Newbie
Posts: 3
Joined: Mon Nov 30, 2009 11:03 am

Re: help catching api statuses

Post by fred2009 »

Yes exactly and the company im using their api is ok with that even half a second
Post Reply