Closed mg1142mg closed 7 years ago
Welcome here. Take a look at the examples and you will quickly learn how to create a new instance of UnifiApi (with the required parameters). Eg.
$unifidata = new UnifiApi($controlleruser, $controllerpassword, $controllerurl, $site_id, $controllerversion);
There are also quite some a lot of other errors in your code; just try to start off with one of the examples and expand from there. Step by step...
Alright.. The thing is, I did that out of my head and hoped it would work. Would do as you suggested and come back here for issues I encounter.. Thanks for your replies!
Ok, good luck!:thumbsup:
EDITS: Last error_log: [10-Jul-2017 03:17:03 UTC] cURL error: Failed to connect to 127.0.0.1 port 8443: Connection refused [10-Jul-2017 03:17:03 UTC] PHP Catchable fatal error: Object of class UnifiApi could not be converted to string in /home/mikael1142/public_html/guest/s/default/auth.php on line 34
Hello guys, first of all, thank you very much for the api, I am sure it will be very useful to me when rightly used!
However, and as you can imagine, I have troubles in using the php class. Can you please guide me on what I am doing wrong here? (I know it's not stackoverflow, but I sense that you can help me in a substantially more efficient way...)
I would understand that you don't want to get into this piece of code or explaining me why my php is wrong. If that's the case, could you redirect me to good material in order for me to correct my beginner mystakes?
Thanks!