0
I have some hardware that exposes an http api (KEMP Load Balancers) (http://kemptechnologies.com/files/support/documentation/KEMP_Restful%20API.pdf)
I would like to create a web page that has some buttons that will operate the API.
For example, this is one of the things that API can do.
https://<LoadMasterIPAddress>/access/showrs?vs=<IPaddr>&port=<Port>&prot=<tcp/udp>&rs=<RS IPaddr>&rsport=<RS-Port>
That returns some XML based data. I would like to display that somehow.
Another example would be to stop/start "real servers" behind the load balancer
https://<LoadMasterIPAddress>/access/enablers?rs=<IP-addr>
or
https://<LoadMasterIPAddress>/access/disablers?rs=<IP-addr>
I can do this with curl in a bash or powershell script but I really need it on a webpage that a customer/end user can use.
Can I do this with PHP? I really need some example code and I can run with it from there.
Do you want the web page to run from a web server or from a client PC? Both are possible. – Julian Knight – 2014-06-06T13:31:50.480
Where the PHP file runs from is far less important to me than the code needed to make the page. It doesn't matter where. Assume there is already a running apache/php system running. – AaronJAnderson – 2014-06-06T13:35:36.397
I've not time to run up an example just now but I can say it is certainly possible. There are lots of options though. Do it all client side (the server only serves the page), do it all server side (PHP does everything in the background) or a hybrid. Hard to choose the best when you don't know the details. I do most stuff in JavaScript these days so I'd probably work client side. Using the JQuery library to make everything easier. Like parsing any return XML. – Julian Knight – 2014-06-06T13:44:47.203
I would need/like to parse return XML! – AaronJAnderson – 2014-06-06T14:35:28.737
JQuery has an XMLparse function as does PHP of course. The complexity of the question is really exceeding a sensible answer here I think. If nothing else, this needs to be moved to Stack Overflow. – Julian Knight – 2014-06-06T14:43:17.217