PHP and iControl REST
Problem this snippet solves: PHP and iControl REST interfaces
Here are a couple of ways to use PHP and iControlREST (iCR). iCR is lighter-weight than iControl SOAP but is only supported on >= v1...
Updated Jun 06, 2023
Version 2.0PeteWhite
Employee
Joined May 16, 2019
PeteWhite
Dec 13, 2018Employee
Updated to include the use of PATCH. Note that with class the modify method is updated to include the PATCH variable. Set this to true to use PATCH method. Remove it or set to false to use PUT. For function, I have added the PATCH variable to the other methods.
Example with class:
'This is a modified Virtual Server');
print_r($r->modify("/ltm/virtual/iCR_Test_VS",$description,true));
echo "Modify HTTP Return Code: $r->code\n";
Example with function:
'This is a modified Virtual Server');
print_r(iCR($handle,$username,$password,'PATCH',$url."/iCR_Test_VS",$description));
Let me know if you feel there are any other useful features required