Check status of port from php page?

Hi, does anybody know how to check the state of a pin from a php webpage ?

I Have created a on/off led example running from a php page, but when i fire up the page i would like to know in which state a port is …


Could you share your code? Not because I know the answer to your question, but because I am trying to do the same thing.

1/ add node http in

2/ code for the imp ( led connected to pin9 )

// LED output example

// Configure an input to the imp from the planner
class input extends InputPort {

function set(s) {
    // Write the pin and show the change on the planner


// Configure pin1 as an output

// Configure ourselves with the one input
imp.configure(“Output”, [input()], []);

for php code see attached file…

have fun…

This is, unfortunately, one of those things that is very simple to do with agents, but very difficult without.