Imp firing .PHP file for Xively feed update

My Imp is programmed to ‘hit’ a .PHP file whenever a switch is activated. Via this .PHP, I was using the APIs to create a tracking graph of when the switch was activated. seems to be going away so I am trying to move to Xively. I have seem the Imp example on the Xively website, but I would like to continue using the .PHP method because the .PHP is also doing a host of other things when the switch is activated.

Does anyone have a .PHP example that can update a Xively feed? My limited skills are not being successful.

My “JunkTest” feed (which I can write data to manually) is at:

Thanks for any guidance.

Why not let the imp do the xively stuff, and then let it call your php file before or afterwards?

The Xively library docs are here

Hi IJLabs. Have you looked at and the examples at

trevor: Thanks. Yes, I tried to modify the examples on github and could not get them to work. This is probably due to user error (stupidity, that is) on my part.

I stripped out everything that I thought was not related to a simple example. Never got it to work, so after a good bit of time spent I decided to ask here.

BTW, I realize, of course, this is not a Imp question and a pure .PHP question. The Imp has been rock solid in my application for almost three years now. The Imp stability blows my mind.

I could modify the Agent code, but would rather not.

:slight_smile: on stability. That’s the idea, you should be able to connect & forget…

I have not ever used xively, but I do use PHP all the time.

I’ll try to find an example somewhere.

mlseim: Thanks! I will take any guidance offered.

Since I don’t know much about Xively, what do you mean by “Manually Writing” to it? Can you POST data to it?

And why is it so complicated? I looked at the PHP libraries and classes for Xively … what’s the deal with that?