CAI Webcontrol - how to get data with php?

Sooty

Member
I just got a CAI webcontrol board v03.01.03. No problems getting it working/online, browser access works fine, using wget from a PC to get data from the .cgi url's works fine, but I would like to use php scripts to get the data. Normally it's no problem to send the user/password to protected pages using fopen, or file_get_contents, but I can't get it working with the webcontrol board. So two questions:

Does anyone have experience they can share of using php with webcontrol?

In the CAI FAQ it refers to turning off the login requirement on the Network page, how do you do that? I deleted the username/password and Saved, but then had to reset the board because it was still asking for a login (and it wasn't the old one).

Thanks :)
 
There is a check box on the network setup page that says "web login enable", you uncheck the box.

However, I don't know what that does. The unit responds from outside requests (I have it port forwarded to a port other than 80) just the same as with the box checked or unchecked. ???

I can not get the email to work. Have you tried? I have the same version as you. Also, the ntp time setting isn't working. I check my router log page after sending test emails and it is blank as far as the cai is concerned. Like it didn't do anything.
 
There is a check box on the network setup page that says "web login enable", you uncheck the box.

However, I don't know what that does. The unit responds from outside requests (I have it port forwarded to a port other than 80) just the same as with the box checked or unchecked. ???

Thanks, that does remove the username/password requirement. I didn't try that because I was thinking it disabled the web access so I guess it's just poorly named...

I can not get the email to work. Have you tried? I have the same version as you. Also, the ntp time setting isn't working. I check my router log page after sending test emails and it is blank as far as the cai is concerned. Like it didn't do anything.

Hmmm, these days it is hard to find SMTP's that don't require authentication but even if the SMTP rejected the connection I would have thought you would see some kind of traffic. I'll give it a try myself, but can you tell me what SMTP you tried?
 
Got the email working, and the time server. It was the gateway. It defaulted to 192.168.1.15, which of course is wrong. It is a dumb thing to default to becuase it is the same address that the unit defaults to and the unit would never be the gateway. Anyhow, I changed the gateway to my router address and all is well.

I unchecked the web login box and mine still has the username password field. Perhaps it just won't ask for it. I didn't really notice because once you log in the first time it doesn't ask for it anymore anyway.

I also found this on how to get x10 working.

http://www.cainetworks.com/products/webcontrol/WebControlX10.pdf

It is pretty simple, you use output 7 as a 5 volt power source and output 8 as the data connection. I don't know if you could get your 5 volts somewhere else and keep output 7 for other things.
 
Thanks for that info, very helpful.

Right, once that box is unchecked it no longer asks for the user/pw password, even from a browser/program that has never connected before.
 
The php issue is resolved if anyone is interested. It's a setup issue, fopen() works fine with the *.cgi pages but my webcontrol is on a non-standard port and my shared hosting webserver is blocked from connecting to that port.
 
Back
Top